mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 15:57:48 +00:00
18 lines
470 B
JavaScript
18 lines
470 B
JavaScript
import basePickBy from './basePickBy.js'
|
|
import hasIn from '../hasIn.js'
|
|
|
|
/**
|
|
* 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, (value, path) => hasIn(object, path))
|
|
}
|
|
|
|
export default basePick
|