uniqWith
Import from @varavel/vdl-plugin-sdk/utils/arrays.
Returns a new array containing only the unique elements from the original array, based on the values returned by the comparator function.
Type Parameters
| Type Parameter | Description |
|---|---|
T |
The type of elements in the array. |
Parameters
| Parameter | Type | Description |
|---|---|---|
arr |
readonly T[] |
The array to process. |
areItemsEqual |
(item1, item2) => boolean |
The function used to compare the array elements. |
Returns
T[]
A new array containing only the unique elements from the original array, based on the values returned by the comparator function.