@felte/common
Advanced tools
Comparing version 1.0.0-next.17 to 1.0.0-next.18
@@ -236,3 +236,9 @@ 'use strict'; | ||
function deepSome(obj, pred) { | ||
return _some(obj, (value) => _isPlainObject(value) ? deepSome(value, pred) : pred(value)); | ||
return _some(obj, (value) => _isPlainObject(value) | ||
? deepSome(value, pred) | ||
: Array.isArray(value) | ||
? value.length === 0 || value.every((v) => typeof v === 'string') | ||
? pred(value) | ||
: value.some((v) => _isPlainObject(v) ? deepSome(v, pred) : pred(v)) | ||
: pred(value)); | ||
} | ||
@@ -239,0 +245,0 @@ |
@@ -8,3 +8,9 @@ import { _some } from './some.js'; | ||
function deepSome(obj, pred) { | ||
return _some(obj, (value) => _isPlainObject(value) ? deepSome(value, pred) : pred(value)); | ||
return _some(obj, (value) => _isPlainObject(value) | ||
? deepSome(value, pred) | ||
: Array.isArray(value) | ||
? value.length === 0 || value.every((v) => typeof v === 'string') | ||
? pred(value) | ||
: value.some((v) => _isPlainObject(v) ? deepSome(v, pred) : pred(v)) | ||
: pred(value)); | ||
} | ||
@@ -11,0 +17,0 @@ |
{ | ||
"name": "@felte/common", | ||
"version": "1.0.0-next.17", | ||
"version": "1.0.0-next.18", | ||
"description": "Common utilities for Felte packages", | ||
@@ -5,0 +5,0 @@ "author": "Pablo Berganza <pablo@berganza.dev>", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
171818
1583