wallet-core/node_modules/lodash/_basePick.js

21 lines
528 B
JavaScript
Raw Normal View History

var basePickBy = require('./_basePickBy'),
hasIn = require('./hasIn');
2016-10-10 03:43:44 +02:00
/**
* The base implementation of `_.pick` without support for individual
* property identifiers.
*
* @private
* @param {Object} object The source object.
* @param {string[]} paths The property paths to pick.
2016-10-10 03:43:44 +02:00
* @returns {Object} Returns the new object.
*/
function basePick(object, paths) {
2016-10-10 03:43:44 +02:00
object = Object(object);
return basePickBy(object, paths, function(value, path) {
return hasIn(object, path);
2016-10-10 03:43:44 +02:00
});
}
module.exports = basePick;