This repository has been archived on 2022-03-12. You can view files and clone it, but cannot push or open issues or pull requests.

20 lines
501 B
JavaScript
Raw Permalink Normal View History

2021-04-02 02:24:13 +03:00
var basePickBy = require('./_basePickBy'),
hasIn = require('./hasIn');
/**
* 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.
* @returns {Object} Returns the new object.
*/
function basePick(object, paths) {
return basePickBy(object, paths, function(value, path) {
return hasIn(object, path);
});
}
module.exports = basePick;