Modularize master branch.

This commit is contained in:
John-David Dalton
2016-12-30 22:26:46 -06:00
parent 912d6b04a1
commit 2900cfd288
745 changed files with 19699 additions and 140151 deletions

25
_arrayFilter.js Normal file
View File

@@ -0,0 +1,25 @@
/**
* A specialized version of `_.filter` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {Array} Returns the new filtered array.
*/
function arrayFilter(array, predicate) {
var index = -1,
length = array == null ? 0 : array.length,
resIndex = 0,
result = [];
while (++index < length) {
var value = array[index];
if (predicate(value, index, array)) {
result[resIndex++] = value;
}
}
return result;
}
export default arrayFilter;