1 | # object.pick [![NPM version](https://badge.fury.io/js/object.pick.svg)](http://badge.fury.io/js/object.pick) [![Build Status](https://travis-ci.org/jonschlinkert/object.pick.svg)](https://travis-ci.org/jonschlinkert/object.pick)
|
2 |
|
3 | > Returns a filtered copy of an object with only the specified keys, like `pick` from lo-dash / underscore.
|
4 |
|
5 | ## Install with [npm](npmjs.org)
|
6 |
|
7 | ```bash
|
8 | npm i object.pick --save
|
9 | ```
|
10 |
|
11 | ## benchmarks
|
12 |
|
13 | This is the [fastest implementation](http://jsperf.com/pick-props) I tested. Pull requests welcome!
|
14 |
|
15 |
|
16 | ## Usage
|
17 |
|
18 | ```js
|
19 | var pick = require('object.pick');
|
20 |
|
21 | pick({a: 'a', b: 'b'}, 'a')
|
22 | //=> {a: 'a'}
|
23 |
|
24 | pick({a: 'a', b: 'b', c: 'c'}, ['a', 'b'])
|
25 | //=> {a: 'a', b: 'b'}
|
26 | ```
|
27 |
|
28 | ## Run tests
|
29 |
|
30 | ```bash
|
31 | npm test
|
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
|
42 | Copyright (c) 2015-2015 Jon Schlinkert
|
43 | Released under the MIT license
|
44 |
|
45 | ***
|
46 |
|
47 | _This file was generated by [verb](https://github.com/assemble/verb) on February 13, 2015._ |
\ | No newline at end of file |