# just-unique

> dedupes an array

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

## Install

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

## 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-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6186 |
| Author | Angus Croll |
| Maintainers | angus-c |
| Keywords | array, unique, dedupe, no-dependencies, just |

## Links

- npm: https://www.npmjs.com/package/just-unique
- 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-unique

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## 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.4.1 — 2021-11-01
- 3.4.0 — 2021-10-31
- 3.3.0 — 2021-05-08
- 3.2.0 — 2018-08-09
- 3.1.1 — 2017-12-06
- 3.1.0 — 2017-10-08
- 3.0.0 — 2017-09-17
- 2.0.4 — 2016-07-31
- 2.0.3 — 2016-07-31
- 2.0.2 — 2016-07-19
- … 6 more at https://npm.io/package/just-unique/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-unique

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-unique)

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

Dedupes an array

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

unique([1, 2, 3, 2, 3, 4, 3, 2, 1, 3]); // [1, 2, 3, 4]

var a = {a: 3};
var b = {b: 4};
var c = {c: 5};
unique([a, a, b, c, b]); // [a, b, c]

unique([1, '1', 2, '2', 3, 2]); // [1, '1', 2, '2', 3]

// declaring sorted array for performance
unique([1, 1, '1', 2, 2, 5, '5', '5'], true); // [1, '1', 2, 5, '6']

// declaring strings array for performance
unique(['a', 'c', 'b', 'c', 'a'], false, true); // ['a', 'b', 'c']
```

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