Use negate in reject.

This commit is contained in:
John-David Dalton
2016-07-23 20:52:15 -07:00
parent 694e1175a1
commit fbd9a804a9

View File

@@ -9252,10 +9252,7 @@
*/
function reject(collection, predicate) {
var func = isArray(collection) ? arrayFilter : baseFilter;
predicate = getIteratee(predicate, 3);
return func(collection, function(value, index, collection) {
return !predicate(value, index, collection);
});
return func(collection, negate(getIteratee(predicate, 3)));
}
/**