source: trip-planner-front/node_modules/object.pick/README.md@ 76712b2

Last change on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 3.4 KB
Line 
1# object.pick [![NPM version](https://img.shields.io/npm/v/object.pick.svg?style=flat)](https://www.npmjs.com/package/object.pick) [![NPM monthly downloads](https://img.shields.io/npm/dm/object.pick.svg?style=flat)](https://npmjs.org/package/object.pick) [![NPM total downloads](https://img.shields.io/npm/dt/object.pick.svg?style=flat)](https://npmjs.org/package/object.pick) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/object.pick.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/object.pick)
2
3> Returns a filtered copy of an object with only the specified keys, similar to `_.pick` from lodash / underscore.
4
5You might also be interested in [object.omit](https://github.com/jonschlinkert/object.omit).
6
7## Install
8
9Install with [npm](https://www.npmjs.com/):
10
11```sh
12$ npm install --save object.pick
13```
14
15## benchmarks
16
17This is the [fastest implementation](http://jsperf.com/pick-props) I tested. Pull requests welcome!
18
19## Usage
20
21```js
22var pick = require('object.pick');
23
24pick({a: 'a', b: 'b'}, 'a')
25//=> {a: 'a'}
26
27pick({a: 'a', b: 'b', c: 'c'}, ['a', 'b'])
28//=> {a: 'a', b: 'b'}
29```
30
31## About
32
33### Related projects
34
35* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.")
36* [get-value](https://www.npmjs.com/package/get-value): Use property paths (`a.b.c`) to get a nested value from an object. | [homepage](https://github.com/jonschlinkert/get-value "Use property paths (`a.b.c`) to get a nested value from an object.")
37* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep "Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone.")
38* [set-value](https://www.npmjs.com/package/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/jonschlinkert/set-value "Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.")
39
40### Contributing
41
42Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
43
44### Building docs
45
46_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_
47
48To generate the readme and API documentation with [verb](https://github.com/verbose/verb):
49
50```sh
51$ npm install -g verb verb-generate-readme && verb
52```
53
54### Running tests
55
56Install dev dependencies:
57
58```sh
59$ npm install -d && npm test
60```
61
62### Author
63
64**Jon Schlinkert**
65
66* [github/jonschlinkert](https://github.com/jonschlinkert)
67* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
68
69### License
70
71Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
72Released under the [MIT license](https://github.com/jonschlinkert/object.pick/blob/master/LICENSE).
73
74***
75
76_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on October 27, 2016._
Note: See TracBrowser for help on using the repository browser.