Skip to content

sindresorhus/array-uniq

Repository files navigation

array-uniq

Create an array without duplicates

Install

$ npm install array-uniq

Usage

import arrayUniq from 'array-uniq';

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

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

Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.