Initial commit
[yaffs-website] / node_modules / grunt-contrib-watch / node_modules / lodash / internal / baseEvery.js
1 var baseEach = require('./baseEach');
2
3 /**
4  * The base implementation of `_.every` without support for callback
5  * shorthands and `this` binding.
6  *
7  * @private
8  * @param {Array|Object|string} collection The collection to iterate over.
9  * @param {Function} predicate The function invoked per iteration.
10  * @returns {boolean} Returns `true` if all elements pass the predicate check,
11  *  else `false`
12  */
13 function baseEvery(collection, predicate) {
14   var result = true;
15   baseEach(collection, function(value, index, collection) {
16     result = !!predicate(value, index, collection);
17     return result;
18   });
19   return result;
20 }
21
22 module.exports = baseEvery;