https://github.com/afeiship/next-pick
Creates an object composed of the picked object properties.
https://github.com/afeiship/next-pick
next pick
Last synced: 23 days ago
JSON representation
Creates an object composed of the picked object properties.
- Host: GitHub
- URL: https://github.com/afeiship/next-pick
- Owner: afeiship
- License: mit
- Created: 2017-10-01T10:12:34.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-11-20T09:36:16.000Z (almost 5 years ago)
- Last Synced: 2025-09-14T06:48:24.055Z (23 days ago)
- Topics: next, pick
- Language: JavaScript
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# next-pick
> Creates an object composed of the picked object properties.[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]## installation
```bash
npm install -S @jswork/next-pick
```## usage
```js
import '@jswork/next-pick';const object = {
'a': 1,
'c': 'c-value',
some: {
what: {
and: {
deep: {
one: 1
}
}
}
}
};const picked = nx.pick(object, ['a', 'c', 'some.what.and.deep.one']);
// {
// "a": 1,
// "c": "c-value",
// "some": {
// "what": {
// "and": {
// "deep": {
// "one": 1
// }
// }
// }
// }
// }
```## license
Code released under [the MIT license](https://github.com/afeiship/next-pick/blob/master/LICENSE.txt).[version-image]: https://img.shields.io/npm/v/@jswork/next-pick
[version-url]: https://npmjs.org/package/@jswork/next-pick[license-image]: https://img.shields.io/npm/l/@jswork/next-pick
[license-url]: https://github.com/afeiship/next-pick/blob/master/LICENSE.txt[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-pick
[size-url]: https://github.com/afeiship/next-pick/blob/master/dist/next-pick.min.js[download-image]: https://img.shields.io/npm/dm/@jswork/next-pick
[download-url]: https://www.npmjs.com/package/@jswork/next-pick