8b6aa0a265eba670f2776db8b0dd4f2e6cc5be2d
[yaffs-website] / node_modules / grunt-legacy-util / node_modules / lodash / _baseSome.js
1 var baseEach = require('./_baseEach');
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, else `false`.
10  */
11 function baseSome(collection, predicate) {
12   var result;
13
14   baseEach(collection, function(value, index, collection) {
15     result = predicate(value, index, collection);
16     return !result;
17   });
18   return !!result;
19 }
20
21 module.exports = baseSome;