Files
lodash/_basePick.js
John-David Dalton 51ed7e7707 Bump to v4.14.0.
2016-07-24 09:52:22 -07:00

20 lines
493 B
JavaScript

import basePickBy from './_basePickBy.js';
/**
* 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;
});
}
export default basePick;