Skip to content

Strip an array of all duplicate entries, including complex objects

Notifications You must be signed in to change notification settings

ericadamski/unique-elements

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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']

About

Strip an array of all duplicate entries, including complex objects

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published