d3ba018f66816b20e046dd0a0e9d286b528cf9b6
[yaffs-website] / node_modules / grunt-legacy-util / node_modules / lodash / _arrayEvery.js
1 /**
2  * A specialized version of `_.every` for arrays without support for
3  * iteratee 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 all elements pass the predicate check, else `false`.
9  */
10 function arrayEvery(array, predicate) {
11   var index = -1,
12       length = array.length;
13
14   while (++index < length) {
15     if (!predicate(array[index], index, array)) {
16       return false;
17     }
18   }
19   return true;
20 }
21
22 module.exports = arrayEvery;