Sha256: cc817c4fce14c09a765f6ee71e790930d1fac5a44b7ade7604e11b97976e8f73
Contents?: true
Size: 590 Bytes
Versions: 303
Compression:
Stored size: 590 Bytes
Contents
var baseEach = require('./_baseEach'); /** * The base implementation of `_.filter` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ function baseFilter(collection, predicate) { var result = []; baseEach(collection, function(value, index, collection) { if (predicate(value, index, collection)) { result.push(value); } }); return result; } module.exports = baseFilter;
Version data entries
303 entries across 279 versions & 33 rubygems