mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 08:57:49 +00:00
Add lazy compact and toArray.
This commit is contained in:
@@ -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],
|
||||
|
||||
Reference in New Issue
Block a user