Returns true if an array has duplicate elements or a string has duplicate characters.
npm install has-duplicatesA Node.js module that checks an array for duplicate elements or a string for duplicate characters.
``bash`
npm install has-duplicates --save
`javascript
const hasDuplicates = require('has-duplicates')
// Arrays
hasDuplicates([1, 1]) // true
hasDuplicates([1, 2]) // false
// Strings
hasDuplicates('aa') // true
hasDuplicates('ab') // false
``