Creates a duplicate-free version of an array, using a Set for equality comparisons, in which only the first occurrence of each element is kept. The order of result values is not guaranteed.
Set
Returns the new duplicate free array.
uniq([2, 1, 2])// [2, 1]uniq([2.1, 1.2, 2.3], Math.floor)// [2.1, 1.2]
sortedUniq
The array containing duplicated elements
Optional
The iteratee invoked per element.
Generated using TypeDoc
Creates a duplicate-free version of an array, using a
Set
for equality comparisons, in which only the first occurrence of each element is kept. The order of result values is not guaranteed.Returns
Returns the new duplicate free array.
Example
See
sortedUniq