Create an array without duplicates
JavaScript
Latest commit 3b5bf5a Jun 16, 2016 @sindresorhus 1.0.3
Permalink
Failed to load latest commit information.
.editorconfig meta tweaks Jun 16, 2016
.gitattributes init Jun 13, 2014
.gitignore init Jun 13, 2014
.travis.yml meta tweaks Jun 16, 2016
index.js meta tweaks Jun 16, 2016
license init Jun 13, 2014
package.json 1.0.3 Jun 16, 2016
readme.md meta tweaks Jun 16, 2016
test.js meta tweaks Jun 16, 2016

readme.md

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

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