# pluck

> pluck values from an object path

Latest version **0.0.4** (published 2013-07-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install pluck
pnpm add pluck
yarn add pluck
bun add pluck
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2013-07-08 |
| First published | 2013-01-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Garrett Johnson |
| Maintainers | gjohnson |
| Keywords | pluck |

## Links

- npm: https://www.npmjs.com/package/pluck
- npm.io page: https://npm.io/package/pluck

## Recent versions

- 0.0.4 (latest) — 2013-07-08
- 0.0.3 — 2013-02-28
- 0.0.2 — 2013-01-03
- 0.0.1 — 2013-01-03

## README

[![Build Status](https://secure.travis-ci.org/gjohnson/pluck.png?branch=master)](http://travis-ci.org/gjohnson/pluck)

# pluck

  pluck property path from arrays or an object.

## Installation

*component*

```sh
  $ component install gjohnson/pluck
```

or

*npm*

```sh
  $ npm install pluck
```

## Example

Pluck from arrays.

```javascript
var pluck = require('pluck');

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

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

var names = firstName(items);
```

Pluck from plain objects.

```javascript
var pluck = require('pluck');

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

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

var name = firstName(item);
```

Pluck using index expressions.

```javascript
var pluck = require('pluck');

var firstName = pluck('name[1].first');
var item = {
  name: [
    {},
    {
      first: 'john',
      last: 'doe'
    }
  ]
};

var name = firstName(item);
```

## License

MIT

---
_Source: https://npm.io/package/pluck · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
