https://github.com/afeiship/next-pick-by
Pick value from object by callback.
https://github.com/afeiship/next-pick-by
by filter find next object pick
Last synced: 6 months ago
JSON representation
Pick value from object by callback.
- Host: GitHub
- URL: https://github.com/afeiship/next-pick-by
- Owner: afeiship
- License: mit
- Created: 2020-07-30T03:22:12.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-20T09:35:50.000Z (almost 5 years ago)
- Last Synced: 2025-03-08T10:02:48.841Z (7 months ago)
- Topics: by, filter, find, next, object, pick
- Language: JavaScript
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# next-pick-by
> Pick value from object by callback.[![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-by
```## usage
```js
import '@jswork/next-pick-by';const object = {
'a': 1,
'c': 'c-value',
'k1': 111,
'k2': 222,
'k3': 333,
some: {
what: {
and: {
deep: {
one: 1
}
}
}
}
};const res = nx.pickBy(object, function (key, value, item) {
return typeof(value) === 'number';
});// { a: 1, k1: 111, k2: 222, k3: 333 }
```## license
Code released under [the MIT license](https://github.com/afeiship/next-pick-by/blob/master/LICENSE.txt).[version-image]: https://img.shields.io/npm/v/@jswork/next-pick-by
[version-url]: https://npmjs.org/package/@jswork/next-pick-by[license-image]: https://img.shields.io/npm/l/@jswork/next-pick-by
[license-url]: https://github.com/afeiship/next-pick-by/blob/master/LICENSE.txt[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-pick-by
[size-url]: https://github.com/afeiship/next-pick-by/blob/master/dist/next-pick-by.min.js[download-image]: https://img.shields.io/npm/dm/@jswork/next-pick-by
[download-url]: https://www.npmjs.com/package/@jswork/next-pick-by