Pibd-21_Ievlewa_M.D._Intern.../node_modules/lodash/_basePick.js
2023-12-03 18:52:09 +03:00

20 lines
501 B
JavaScript

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;