2 * A specialized version of `_.filter` for arrays without support for callback
3 * shorthands and `this` binding.
6 * @param {Array} array The array to iterate over.
7 * @param {Function} predicate The function invoked per iteration.
8 * @returns {Array} Returns the new filtered array.
10 function arrayFilter(array, predicate) {
12 length = array.length,
16 while (++index < length) {
17 var value = array[index];
18 if (predicate(value, index, array)) {
19 result[++resIndex] = value;
25 module.exports = arrayFilter;