Rename pickByCallback to pickByPredicate.

This commit is contained in:
jdalton
2015-07-04 11:26:22 -07:00
committed by John-David Dalton
parent 04bac321d1
commit d3d4de12be

View File

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