UNPKG

985 BMarkdownView Raw
1# object.pick [![NPM version](https://badge.fury.io/js/object.pick.svg)](http://badge.fury.io/js/object.pick)
2
3> Returns a filtered copy of an object with only the specified keys, exactly like `pick` from lo-dash / underscore.
4
5## Install
6#### Install with [npm](npmjs.org):
7
8```bash
9npm i object.pick --save-dev
10```
11
12## benchmarks
13
14This is the [fastest implementation](http://jsperf.com/pick-props) I tested. Pull requests welcome!
15
16## Run tests
17
18```bash
19npm test
20```
21
22## Usage
23
24```js
25var pick = require('object.pick');
26
27pick({a: 'a', b: 'b'}, 'a')
28//=> {a: 'a'}
29
30pick({a: 'a', b: 'b', c: 'c'}, ['a', 'b'])
31//=> {a: 'a', b: 'b'}
32```
33
34## Author
35
36**Jon Schlinkert**
37
38+ [github/jonschlinkert](https://github.com/jonschlinkert)
39+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
40
41## License
42Copyright (c) 2014 Jon Schlinkert, contributors.
43Released under the MIT license
44
45***
46
47_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 06, 2014._
\No newline at end of file