b93d53129867f34ad2c569eb98d9393499f805f9
[yaffs-website] / node_modules / uncss / node_modules / lodash / internal / arraySome.js
1 /**
2  * A specialized version of `_.some` for arrays without support for iteratee
3  * shorthands.
4  *
5  * @private
6  * @param {Array} array The array to iterate over.
7  * @param {Function} predicate The function invoked per iteration.
8  * @returns {boolean} Returns `true` if any element passes the predicate check, else `false`.
9  */
10 function arraySome(array, predicate) {
11   var index = -1,
12       length = array.length;
13
14   while (++index < length) {
15     if (predicate(array[index], index, array)) {
16       return true;
17     }
18   }
19   return false;
20 }
21
22 module.exports = arraySome;