MCPcopy
hub / github.com/lodash/lodash / some

Function some

lodash.js:9991–9997  ·  view source on GitHub ↗

* Checks if `predicate` returns truthy for **any** element of `collection`. * Iteration is stopped once `predicate` returns truthy. The predicate is * invoked with three arguments: (value, index|key, collection). * * @static * @memberOf _ * @since 0.1.0 * @category

(collection, predicate, guard)

Source from the content-addressed store, hash-verified

9989 * // => true
9990 */
9991 function some(collection, predicate, guard) {
9992 var func = isArray(collection) ? arraySome : baseSome;
9993 if (guard && isIterateeCall(collection, predicate, guard)) {
9994 predicate = undefined;
9995 }
9996 return func(collection, getIteratee(predicate, 3));
9997 }
9998
9999 /**
10000 * Creates an array of elements, sorted in ascending order by the results of

Callers

nothing calls this directly

Calls 2

isIterateeCallFunction · 0.85
getIterateeFunction · 0.85

Tested by

no test coverage detected