mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 09:47:48 +00:00
Modularize master branch.
This commit is contained in:
19
_basePick.js
Normal file
19
_basePick.js
Normal file
@@ -0,0 +1,19 @@
|
||||
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, function(value, path) {
|
||||
return hasIn(object, path);
|
||||
});
|
||||
}
|
||||
|
||||
export default basePick;
|
||||
Reference in New Issue
Block a user