# just-pick

> copy an object but with only the specified keys

Latest version **4.2.0** (published 2022-12-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install just-pick
pnpm add just-pick
yarn add just-pick
bun add just-pick
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.2.0 |
| Published | 2022-12-17 |
| First published | 2016-07-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6190 |
| Author | Angus Croll |
| Maintainers | angus-c |
| Keywords | object, pick, keys, no-dependencies, just |

## Links

- npm: https://www.npmjs.com/package/just-pick
- Repository: https://github.com/angus-c/just
- Homepage: https://github.com/angus-c/just#readme
- Issues: https://github.com/angus-c/just/issues
- npm.io page: https://npm.io/package/just-pick

## Recent versions

- 4.2.0 (latest) — 2022-12-17
- 4.1.1 — 2022-08-08
- 4.1.0 — 2022-08-07
- 4.0.1 — 2021-11-13
- 4.0.0 — 2021-11-09
- 3.1.1 — 2021-11-01
- 3.1.0 — 2021-10-31
- 3.0.0 — 2021-10-22
- 2.2.1 — 2021-04-04
- 2.2.0 — 2021-04-04
- 2.1.0 — 2018-08-09
- 2.0.0 — 2018-05-27
- 1.0.3 — 2016-07-31
- 1.0.2 — 2016-07-31
- 1.0.1 — 2016-07-23
- … 1 more at https://npm.io/package/just-pick/versions

## README

<!-- DO NOT EDIT THIS FILE! THIS FILE WAS AUTOGENERATED BY TEMPLATE-MATE -->
<!-- SEE https://github.com/angus-c/just/blob/master/CONTRIBUTING.md#readme-template -->

## just-pick

Part of a [library](https://anguscroll.com/just) of zero-dependency npm modules that do just do one thing.
Guilt-free utilities for every occasion.

[`🍦 Try it`](https://anguscroll.com/just/just-pick)

```shell
npm install just-pick
```
```shell
yarn add just-pick
```

Copy an object but with only the specified keys

```js
import pick from 'just-pick';

var obj = { a: 3, b: 5, c: 9 };
pick(obj, ['a', 'c']); // {a: 3, c: 9}
pick(obj, 'a', 'c'); // {a: 3, c: 9}
pick(obj, ['a', 'b', 'd']); // {a: 3, b: 5}
pick(obj, ['a', 'a']); // {a: 3}
```

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