mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 03:17:49 +00:00
Use negate in reject.
This commit is contained in:
@@ -9252,10 +9252,7 @@
|
|||||||
*/
|
*/
|
||||||
function reject(collection, predicate) {
|
function reject(collection, predicate) {
|
||||||
var func = isArray(collection) ? arrayFilter : baseFilter;
|
var func = isArray(collection) ? arrayFilter : baseFilter;
|
||||||
predicate = getIteratee(predicate, 3);
|
return func(collection, negate(getIteratee(predicate, 3)));
|
||||||
return func(collection, function(value, index, collection) {
|
|
||||||
return !predicate(value, index, collection);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user