1 var baseEach = require('./_baseEach');
4 * The base implementation of `_.filter` without support for iteratee shorthands.
7 * @param {Array|Object} collection The collection to iterate over.
8 * @param {Function} predicate The function invoked per iteration.
9 * @returns {Array} Returns the new filtered array.
11 function baseFilter(collection, predicate) {
13 baseEach(collection, function(value, index, collection) {
14 if (predicate(value, index, collection)) {
21 module.exports = baseFilter;