mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 16:17:50 +00:00
Tweak lazy _.pluck and _.where methods.
This commit is contained in:
@@ -10195,10 +10195,10 @@
|
||||
// Add `LazyWrapper` methods for `_.pluck` and `_.where`.
|
||||
arrayEach(['pluck', 'where'], function (methodName, index) {
|
||||
var operationName = index ? 'filter' : 'map',
|
||||
getCallback = index ? matches : property;
|
||||
createCallback = index ? matches : property;
|
||||
|
||||
LazyWrapper.prototype[methodName] = function(value) {
|
||||
return this[operationName](getCallback(value));
|
||||
return this[operationName](createCallback(value));
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user