@arr/unique
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

@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

Package Sidebar

Install

npm i @arr/unique

Weekly Downloads

6

Version

1.0.1

License

MIT

Unpacked Size

1.45 kB

Total Files

5

Last publish

Collaborators

  • lukeed