We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Checks if there are no duplicate values. 🏃 📦 🌔
Alternatives: compare, map.
array.isUnique(x, [fn]); // x: an array // fn: compare function (a, b)
const array = require('extra-array'); var x = [1, 2, -1, -2]; array.isUnique(x); // true array.isUnique(x, (a, b) => Math.abs(a) - Math.abs(b)); // false