array-uniq / 1.0.3 last updated 11 days ago created on Jun 13th 2014

Install

npm install --save array-uniq

Clone

git clone git@github.com:sindresorhus/array-uniq.git

dependencies

No dependencies listed.

maintainers

sindresorhus sindresorhus

versions 6 total

1.0.3 11 days ago sindresorhus
1.0.2 2 years ago sindresorhus
1.0.1 2 years ago sindresorhus
1.0.0 2 years ago sindresorhus
0.1.1 2 years ago sindresorhus
0.1.0 2 years ago sindresorhus
67102 Downloads yesterday.

readme

array-uniq Build Status

Create an array without duplicates

It's already pretty fast, but will be much faster when Set becomes available in V8 (especially with large arrays).

Install

$ npm install --save array-uniq

Usage

1
2
3
4
5
6
7
const arrayUniq = require('array-uniq');

arrayUniq([1, 1, 2, 3, 3]);
//=> [1, 2, 3]

arrayUniq(['foo', 'foo', 'bar', 'foo']);
//=> ['foo', 'bar']

License

MIT © Sindre Sorhus

Resolving all dependencies.. This could take a while as our cache is not yet fully warmed up.