mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 02:17:48 +00:00
Use predicate instead of iteratee.
This commit is contained in:
@@ -11326,18 +11326,18 @@
|
|||||||
return this.filter(identity);
|
return this.filter(identity);
|
||||||
};
|
};
|
||||||
|
|
||||||
LazyWrapper.prototype.dropWhile = function(iteratee, thisArg) {
|
LazyWrapper.prototype.dropWhile = function(predicate, thisArg) {
|
||||||
var done;
|
var done;
|
||||||
iteratee = getCallback(iteratee, thisArg, 3);
|
predicate = getCallback(predicate, thisArg, 3);
|
||||||
return this.filter(function(value, index, array) {
|
return this.filter(function(value, index, array) {
|
||||||
return done || (done = !iteratee(value, index, array));
|
return done || (done = !predicate(value, index, array));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
LazyWrapper.prototype.reject = function(iteratee, thisArg) {
|
LazyWrapper.prototype.reject = function(predicate, thisArg) {
|
||||||
iteratee = getCallback(iteratee, thisArg, 3);
|
predicate = getCallback(predicate, thisArg, 3);
|
||||||
return this.filter(function(value, index, array) {
|
return this.filter(function(value, index, array) {
|
||||||
return !iteratee(value, index, array);
|
return !predicate(value, index, array);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user