npm-array-has-duplicate
v0.0.3
Published
Extends the Array.prototype to have a method to check if there are any duplicate values in the array. Return true on the first duplicate found or false if no duplicates are found.
Readme
Introduction
Extends the Array.prototype to have a method to check if there are any duplicate values in the array. Return true on the first duplicate found or false if no duplicates are found.
Example
require('npm-array-has-duplicate');
console.log([1, 3, 7, 11, 51].hasDuplicate());
console.log([1, 3, 7, 11, 51, 3].hasDuplicate());