You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

isunique

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

isunique

A module that helps determine if an array has only unique elements

1.0.0
latest
Source
npmnpm
Version published
Weekly downloads
27
107.69%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

is

FAQs

Package last updated on 26 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts