1.0.1 • Published 5 years ago

@arr/unique v1.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

@arr/unique

Tiny (111B) & fast utility to retrieve all unique values from an Array.

Install

$ npm install --save @arr/unique

Usage

import unique from '@arr/unique';

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

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

API

unique(arr)

arr

Type: Array The array to iterate upon.

License

MIT © Luke Edwards