# @ngard/tiny-pick

> A minimal-weight utility equivalent to lodash.pick

Latest version **1.0.0** (published 2019-04-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ngard/tiny-pick
pnpm add @ngard/tiny-pick
yarn add @ngard/tiny-pick
bun add @ngard/tiny-pick
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-04-29 |
| First published | 2019-04-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 11.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Nick Gard |
| Maintainers | ngard |
| Keywords | lodash, pick, util |

## Links

- npm: https://www.npmjs.com/package/@ngard/tiny-pick
- Repository: https://github.com/NickGard/tiny-pick
- Homepage: https://github.com/NickGard/tiny-pick#readme
- Issues: https://github.com/NickGard/tiny-pick/issues
- npm.io page: https://npm.io/package/@ngard/tiny-pick

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2019-04-29

## README

# tiny-pick

[![source](https://badgen.net/npm/v/@ngard/tiny-pick)](https://www.npmjs.com/package/@ngard/tiny-pick)
[![bundle size](https://badgen.net/bundlephobia/minzip/@ngard/tiny-pick)](https://bundlephobia.com/result?p=@ngard/tiny-pick)
[![build status](https://badgen.net/travis/NickGard/tiny-pick)](https://travis-ci.org/NickGard/tiny-pick)
[![license](https://badgen.net/badge/license/MIT/blue)](https://badgen.net/badge/license/MIT/blue)

A minimal utility equivalent to `lodash.pick`. For when every byte counts!

<hr/>

lodash.pick: [![bundle size](https://badgen.net/bundlephobia/minzip/lodash.pick)](https://bundlephobia.com/result?p=lodash.pick)
<br/>
tiny-pick: [![bundle size](https://badgen.net/bundlephobia/minzip/@ngard/tiny-pick)](https://bundlephobia.com/result?p=@ngard/tiny-pick)

<hr/>

## Install

```sh
npm install @ngard/tiny-pick
```

## Syntax

```javascript
pick(/* source, key [, key2, ...] */);
```

## Parameters

`source` - `[Object|Array]` The object whose key/value pairs will be picked.
`key [, key2, ...]` - `[String|Array<String>]` An array or list of key names.

## Returns
An object comprised of the picked key/value pairs.

## Example

```javascript
import { pick } from '@ngard/tiny-pick';

const character = {
  name: 'Luke Skywalker',
  description: 'whiny Jedi',
  planet: 'Tatooine',
  system: 'Jabak',
}

const bio = pick(character, 'name', 'description');
// { name: 'Luke Skywalker', description: 'whiny Jedi' }

const address = pick(character, ['planet', 'system']);
// { planet: 'Tatooine', system: 'Jabak' }

/* Picking Arrays */
pick(['a', 'b', 'c'], 0, 2); // { 0: 'a', 2: 'c' }
```

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