Checks if there are no duplicate values.
Alternatives: compare, map.
This is part of package extra-array.
This is browserified, minified version of @extra-array/is-unique-on.
It is exported as global variable array_isUniqueOn.
CDN: unpkg, jsDelivr.
array.isUniqueOn(x, [fn], [ths]);
// x: an array
// fn: map function (v, i, x)
// ths: this argument
const array = require('extra-array');
var x = [1, 2, -1, -2];
array.isUniqueOn(x);
// true
array.isUniqueOn(x, v => Math.abs(v));
// false