* A specialized version of `_.some` for arrays without support for callback * shorthands and `this` binding. * * @private * @param {Array} array The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if any element
(array, predicate)
| 14662 | * else `false`. |
| 14663 | */ |
| 14664 | function arraySome(array, predicate) { |
| 14665 | var index = -1, |
| 14666 | length = array.length; |
| 14667 | |
| 14668 | while (++index < length) { |
| 14669 | if (predicate(array[index], index, array)) { |
| 14670 | return true; |
| 14671 | } |
| 14672 | } |
| 14673 | return false; |
| 14674 | } |
| 14675 | |
| 14676 | module.exports = arraySome; |
| 14677 |