Licence
MIT
Version
2.0.0
Deps
0
Vulns
0
Weekly
0
pick 
Create a shallow copy of an input object that contains only the specified properties.
$ component install ndhoule/pick
$ npm install @ndhoule/pick
API
pick(props : string|string[], object: Object) => Object
Return a shallow copy of an input object containing only a specified list of properties.
var person = { name: 'Tim', occupation: 'enchanter', fears: 'rabbits' };
pick('name', person);
//=> { name: 'Tim' }
pick(['name', 'fears'], person);
//=> { name: 'Tim', fears: 'rabbits' }
License
Released under the MIT license.