-
Notifications
You must be signed in to change notification settings - Fork 0
isUnique
Subhajit Sahu edited this page Jun 19, 2020
·
1 revision
Examine if there are no duplicate values.
Similar: [unique], isUnique.
function isUnique(x, fc, fm)
// x: a sorted array
// fc: compare function (a, b)
// fm: map function (v, i, x)
const xsortedArray = require('extra-sorted-array');
var x = [10, 20, 20, 40, 40, 80];
xsortedArray.isUnique(x);
// → false
var y = [10, 20, 30, 40, 80]
xsortedArray.isUnique(y);
// → true