mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 23:57:49 +00:00
Use negate in reject.
This commit is contained in:
@@ -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)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user