uniq
Import from @varavel/vdl-plugin-sdk/utils/arrays.
Creates a duplicate-free version of an array.
This function takes an array and returns a new array containing only the unique values from the original array, preserving the order of first occurrence.
Type Parameters
| Type Parameter | Description |
|---|---|
T |
The type of elements in the array. |
Parameters
| Parameter | Type | Description |
|---|---|---|
arr |
readonly T[] |
The array to process. |
Returns
T[]
A new array with only unique values from the original array.