https://github.com/jarofghosts/just-pluck
pluck without the madness
https://github.com/jarofghosts/just-pluck
Last synced: 7 months ago
JSON representation
pluck without the madness
- Host: GitHub
- URL: https://github.com/jarofghosts/just-pluck
- Owner: jarofghosts
- License: mit
- Created: 2014-06-18T20:17:44.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2016-01-23T22:18:57.000Z (about 10 years ago)
- Last Synced: 2024-12-30T17:02:03.417Z (over 1 year ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 11
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-micro-npm-packages - just-pluck - Pluck without the madness. (Modules / Object)
- awesome-micro-npm-packages-zh - just-pluck - 获取对应key的所有值. (模块 / 对象)
- awesome-micro-npm-packages - just-pluck - Pluck without the madness. (Modules / Object)
- fucking-awesome-micro-npm-packages - just-pluck - Pluck without the madness. (Modules / Object)
README
# just-pluck
[](https://travis-ci.org/jarofghosts/just-pluck)
[](https://www.npmjs.org/package/just-pluck)
[](https://www.npmjs.org/package/just-pluck)
[](https://github.com/feross/standard)
[](https://github.com/jarofghosts/just-pluck/blob/master/LICENSE)
simple pluck function
## why
there are a lot of implementations out there that either don't support deep
lookup or try to do too much wacky stuff or have a lot of dependencies for no
good reason.
## usage
```js
var pluck = require('just-pluck')
var pokemon = [{name: 'pikachu'}, {name: 'meowth'}, {name: 'mr mime'}]
console.log(pluck('name', pokemon)) // ['pikachu', 'meowth', 'mr mime']
```
## notes
if nothing is pluck-able from the item in your array, it will be `undefined` in
the result.
## license
MIT