There was an error while loading. Please reload this page.
Remove duplicate values.
Similar: unique, [isUnique].
function unique(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.unique(x); // → [ 10, 20, 40, 80 ]