mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 18:17:48 +00:00
Rename pickByCallback to pickByPredicate.
This commit is contained in:
committed by
John-David Dalton
parent
04bac321d1
commit
d3d4de12be
@@ -4385,7 +4385,7 @@
|
|||||||
* @param {Function} predicate The function invoked per iteration.
|
* @param {Function} predicate The function invoked per iteration.
|
||||||
* @returns {Object} Returns the new object.
|
* @returns {Object} Returns the new object.
|
||||||
*/
|
*/
|
||||||
function pickByCallback(object, predicate) {
|
function pickByPredicate(object, predicate) {
|
||||||
var result = {};
|
var result = {};
|
||||||
baseForIn(object, function(value, key, object) {
|
baseForIn(object, function(value, key, object) {
|
||||||
if (predicate(value, key, object)) {
|
if (predicate(value, key, object)) {
|
||||||
@@ -9517,7 +9517,7 @@
|
|||||||
return pickByArray(object, baseDifference(keysIn(object), props));
|
return pickByArray(object, baseDifference(keysIn(object), props));
|
||||||
}
|
}
|
||||||
var predicate = props[0];
|
var predicate = props[0];
|
||||||
return pickByCallback(object, function(value, key, object) {
|
return pickByPredicate(object, function(value, key, object) {
|
||||||
return !predicate(value, key, object);
|
return !predicate(value, key, object);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -9581,7 +9581,7 @@
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
return typeof props[0] == 'function'
|
return typeof props[0] == 'function'
|
||||||
? pickByCallback(object, props[0])
|
? pickByPredicate(object, props[0])
|
||||||
: pickByArray(object, baseFlatten(props));
|
: pickByArray(object, baseFlatten(props));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user