Add lazy compact and toArray.

This commit is contained in:
jdalton
2015-02-10 00:08:09 -08:00
parent 16a9c7d492
commit ce44f7e4b0
2 changed files with 62 additions and 35 deletions

View File

@@ -11087,6 +11087,10 @@
};
});
LazyWrapper.prototype.compact = function() {
return this.filter(identity);
};
LazyWrapper.prototype.dropWhile = function(iteratee, thisArg) {
var done;
iteratee = getCallback(iteratee, thisArg, 3);
@@ -11113,6 +11117,10 @@
return result;
};
LazyWrapper.prototype.toArray = function() {
return this.drop(0);
};
// Add `LazyWrapper` methods to `lodash.prototype`.
baseForOwn(LazyWrapper.prototype, function(func, methodName) {
var lodashFunc = lodash[methodName],