Nationwide Polamorous Matrimony
Wondering what’s next for npm?Check out our public roadmap! »

isunique

1.0.0 • Public • Published

isUnique

Build Status

Checks to see if an array has only unique values

Installation

> npm install --save isunique

Usage

isUnique

Returns true if the array only has unique elements. Otherwise, return false

[1].isUnique() // true
[1,2].isUnique() // true
[1,1].isUnique() // false

getUnique

Gets the unique version of the array. If there are two matching elements, the latter is removed

[1].getUnique() // [1]
[1,1].getUnique() // [1]
[1,2].getUnique() // [1,2]
[1,2,1,2].getUnique() // [1,2]
[1,2,2,2].getUnique() // [1,2]

Version

1.0.0

  • First working version

Install

npm i isunique

DownloadsWeekly Downloads

11

Version

1.0.0

License

ISC

Last publish

Collaborators

  • avatar