1 var baseEach = require('./baseEach');
4 * The base implementation of `_.every` without support for callback
5 * shorthands and `this` binding.
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,
13 function baseEvery(collection, predicate) {
15 baseEach(collection, function(value, index, collection) {
16 result = !!predicate(value, index, collection);
22 module.exports = baseEvery;