Use predicate instead of iteratee.

This commit is contained in:
Graeme
2015-02-12 21:34:05 -05:00
committed by jdalton
parent 07b13eedec
commit 5ca13098e3

View File

@@ -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);
}); });
}; };