map
Import from @varavel/vdl-plugin-sdk/utils/sets.
Creates a new Set with elements transformed by the provided function.
This function takes a Set and a function that generates a new value from each element. It returns a new Set where the elements are the result of applying the function to each element.
Type Parameters
| Type Parameter | Description |
|---|---|
T |
The type of elements in the input Set. |
U |
The type of elements in the output Set. |
Parameters
| Parameter | Type | Description |
|---|---|---|
set |
Set\<T> |
The Set to transform. |
getNewValue |
(value, value2, set) => U |
A function that generates a new value from an element. |
Returns
Set\<U>
A new Set with transformed elements.