1 var toObject = require('./toObject');
4 * A specialized version of `_.pick` which picks `object` properties specified
8 * @param {Object} object The source object.
9 * @param {string[]} props The property names to pick.
10 * @returns {Object} Returns the new object.
12 function pickByArray(object, props) {
13 object = toObject(object);
16 length = props.length,
19 while (++index < length) {
20 var key = props[index];
22 result[key] = object[key];
28 module.exports = pickByArray;