assert-unique
Test if values have no duplication
; // Error: 3 and "a" are duplicated.
Installation
Package managers
npm 
npm install assert-unique
bower 
bower install assert-unique
Duo
var assertUnique = ;
Standalone
Directly download the script file and its dependencies.
Dependencies
API
assertUnique([val0, val1, val2, ...])
val0, val1, val2, ...: any types
It throws an error when the arguments include duplicated values. Otherwise it doesn't throw any errors.
; // doesn't throw error; // doesn't throw error ; // Error: "l" is duplicated.; // Error: [Function: parseInt] is duplicated.
Note that it doesn't check deep equality.
var obj = {}; ; // Error: {} is duplicated. ; // doesn't throw error
License
Copyright (c) 2014 Shinnosuke Watanabe
Licensed under the MIT License.