Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jarofghosts/just-pluck
pluck without the madness
https://github.com/jarofghosts/just-pluck
Last synced: about 2 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 (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-01-23T22:18:57.000Z (over 8 years ago)
- Last Synced: 2024-02-29T17:22:20.527Z (4 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 11
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-micro-npm-packages - just-pluck - Pluck without the madness. (Modules / Object)
- awesome-micro-npm-packages - just-pluck - Pluck without the madness. (Modules / Object)
README
# just-pluck
[![Build Status](http://img.shields.io/travis/jarofghosts/just-pluck.svg?style=flat-square)](https://travis-ci.org/jarofghosts/just-pluck)
[![npm install](http://img.shields.io/npm/dm/just-pluck.svg?style=flat-square)](https://www.npmjs.org/package/just-pluck)
[![npm version](https://img.shields.io/npm/v/just-pluck.svg?style=flat-square)](https://www.npmjs.org/package/just-pluck)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)
[![License](https://img.shields.io/npm/l/just-pluck.svg?style=flat-square)](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