1 var arrayMap = require('./_arrayMap'),
2 basePick = require('./_basePick'),
3 flatRest = require('./_flatRest'),
4 toKey = require('./_toKey');
7 * Creates an object composed of the picked `object` properties.
13 * @param {Object} object The source object.
14 * @param {...(string|string[])} [props] The property identifiers to pick.
15 * @returns {Object} Returns the new object.
18 * var object = { 'a': 1, 'b': '2', 'c': 3 };
20 * _.pick(object, ['a', 'c']);
21 * // => { 'a': 1, 'c': 3 }
23 var pick = flatRest(function(object, props) {
24 return object == null ? {} : basePick(object, arrayMap(props, toKey));
27 module.exports = pick;