Sha256: 0af44ba52fdb2c38eb15d7bb1793cc4a4f859f1296c5965333d631c438c39d6f
Contents?: true
Size: 552 Bytes
Versions: 26
Compression:
Stored size: 552 Bytes
Contents
var arrayReduce = require('./_arrayReduce'); /** * 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 arrayReduce(props, function(result, key) { if (key in object) { result[key] = object[key]; } return result; }, {}); } module.exports = basePick;
Version data entries
26 entries across 4 versions & 2 rubygems