aboutsummaryrefslogtreecommitdiff
path: root/node_modules/lodash/_basePickBy.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/lodash/_basePickBy.js')
-rw-r--r--node_modules/lodash/_basePickBy.js17
1 files changed, 9 insertions, 8 deletions
diff --git a/node_modules/lodash/_basePickBy.js b/node_modules/lodash/_basePickBy.js
index dc9b342e8..6ada1f36a 100644
--- a/node_modules/lodash/_basePickBy.js
+++ b/node_modules/lodash/_basePickBy.js
@@ -1,25 +1,26 @@
-var baseAssignValue = require('./_baseAssignValue');
+var baseGet = require('./_baseGet'),
+ baseSet = require('./_baseSet');
/**
* The base implementation of `_.pickBy` without support for iteratee shorthands.
*
* @private
* @param {Object} object The source object.
- * @param {string[]} props The property identifiers to pick from.
+ * @param {string[]} paths The property paths to pick.
* @param {Function} predicate The function invoked per property.
* @returns {Object} Returns the new object.
*/
-function basePickBy(object, props, predicate) {
+function basePickBy(object, paths, predicate) {
var index = -1,
- length = props.length,
+ length = paths.length,
result = {};
while (++index < length) {
- var key = props[index],
- value = object[key];
+ var path = paths[index],
+ value = baseGet(object, path);
- if (predicate(value, key)) {
- baseAssignValue(result, key, value);
+ if (predicate(value, path)) {
+ baseSet(result, path, value);
}
}
return result;