source: imaps-frontend/node_modules/lodash-es/_baseSome.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 617 bytes
Line 
1import baseEach from './_baseEach.js';
2
3/**
4 * The base implementation of `_.some` without support for iteratee shorthands.
5 *
6 * @private
7 * @param {Array|Object} collection The collection to iterate over.
8 * @param {Function} predicate The function invoked per iteration.
9 * @returns {boolean} Returns `true` if any element passes the predicate check,
10 * else `false`.
11 */
12function baseSome(collection, predicate) {
13 var result;
14
15 baseEach(collection, function(value, index, collection) {
16 result = predicate(value, index, collection);
17 return !result;
18 });
19 return !!result;
20}
21
22export default baseSome;
Note: See TracBrowser for help on using the repository browser.