# reduce-unique

> Reduce an array to unique values, optionally into a separate array.

Latest version **2.0.1** (published 2018-06-10) · MIT license · 0 weekly downloads

## Install

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

## 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 | 2.0.1 |
| Published | 2018-06-10 |
| First published | 2016-03-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 0 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Lloyd Brookes |
| Maintainers | 75lb |
| Keywords | reduce, array, unique |

## Links

- npm: https://www.npmjs.com/package/reduce-unique
- Repository: https://github.com/75lb/reduce-unique
- Homepage: https://github.com/75lb/reduce-unique#readme
- Issues: https://github.com/75lb/reduce-unique/issues
- npm.io page: https://npm.io/package/reduce-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

- 2.0.1 (latest) — 2018-06-10
- 2.0.0 — 2018-06-04
- 1.0.0 — 2016-03-01

## README

[![view on npm](http://img.shields.io/npm/v/reduce-unique.svg)](https://www.npmjs.org/package/reduce-unique)
[![npm module downloads](http://img.shields.io/npm/dt/reduce-unique.svg)](https://www.npmjs.org/package/reduce-unique)
[![Build Status](https://travis-ci.org/75lb/reduce-unique.svg?branch=master)](https://travis-ci.org/75lb/reduce-unique)
[![Dependency Status](https://david-dm.org/75lb/reduce-unique.svg)](https://david-dm.org/75lb/reduce-unique)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard)

<a name="module_reduce-unique"></a>

## reduce-unique
Reduce an array to unique values, optionally into a separate array.

**Example**  
```js
> const unique = require('reduce-unique')

> const arr = [ 1, 3, 8, 3, 1, 2, 1, 9, 3, 3 ]

> arr.reduce(unique)
[ 1, 3, 8, 2, 9 ]

> arr.reduce(unique, [ 'one', 'two' ])
[ 'one', 'two', 1, 3, 8, 2, 9 ]

> arr.reduce([ 3 ])
3
```

* * *

&copy; 2016-18 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown).

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