mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 07:17:50 +00:00
21 lines
527 B
JavaScript
21 lines
527 B
JavaScript
define(['./_basePickBy'], function(basePickBy) {
|
|
|
|
/**
|
|
* The base implementation of `_.pick` without support for individual
|
|
* property identifiers.
|
|
*
|
|
* @private
|
|
* @param {Object} object The source object.
|
|
* @param {string[]} props The property identifiers to pick.
|
|
* @returns {Object} Returns the new object.
|
|
*/
|
|
function basePick(object, props) {
|
|
object = Object(object);
|
|
return basePickBy(object, props, function(value, key) {
|
|
return key in object;
|
|
});
|
|
}
|
|
|
|
return basePick;
|
|
});
|