plu

pluck

pluck values from an object path

Showing:

Popularity

Downloads/wk

939

Maintenance

No Maintenance Data Available

Package

Dependencies

0

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Build Status

pluck

pluck property path from arrays or an object.

Installation

component

  $ component install redventures/pluck

or

npm

  $ npm install pluck

Example

Pluck from arrays.

var pluck = require('pluck');

var firstName = pluck('name.first');

var items = [
  { name: { first: 'john', last: 'doe' } }
];

var names = firstName(items);

Pluck from simple objects.

var pluck = require('pluck');

var item = {
  name: {
    first: 'john',
    last: 'doe'
  }
};

var name = firstName(item);

API

pluck(path)

Creates the property lookup function.

License

MIT

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial