* 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 arra
(collection, predicate)
| 2957 | * @returns {Array} Returns the new filtered array. |
| 2958 | */ |
| 2959 | function baseFilter(collection, predicate) { |
| 2960 | var result = []; |
| 2961 | baseEach(collection, function(value, index, collection) { |
| 2962 | if (predicate(value, index, collection)) { |
| 2963 | result.push(value); |
| 2964 | } |
| 2965 | }); |
| 2966 | return result; |
| 2967 | } |
| 2968 | |
| 2969 | /** |
| 2970 | * The base implementation of `_.flatten` with support for restricting flattening. |
nothing calls this directly
no test coverage detected