A tiny (111B) & fast utility to retrieve all unique values from an Array
@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
Repository
lukeed/arr