unique-elements

1.0.0 • Public • Published

unique-elements

Strip an array of all duplicate entries, including complex objects

Install

$ yarn add unique-elements

or

$ npm install unique-elements

Usage

const unique = require('unique-elements');

unique([1, 2, 2, 3, 3, 5, 6, 6, 6, 6]);
// [1, 2, 3, 5, 6]

unique(['string', 'another', 'different', 'string']);
// ['string', 'another', 'different']

unique([[1, 2, 3], [1, 2, 3], 1, 2, 'string', 1, 'string']);
// [[1, 2, 3], 1, 2, 'string']

Package Sidebar

Install

npm i unique-elements

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

1.22 kB

Total Files

3

Last publish

Collaborators

  • ericadamski