uniq
@guoba-ai/utils / array / uniq
Function: uniq()
function uniq<T>(array): T[];Defined in: array.ts:28
Remove duplicate elements from an array.
Type Parameters
T
T
Parameters
array
T[]
The input array
Returns
T[]
A new array with duplicates removed, preserving order
Example
uniq([1, 2, 2, 3]) // [1, 2, 3]