at
Import from @varavel/vdl-plugin-sdk/utils/arrays.
Retrieves elements from an array at the specified indices.
This function supports negative indices, which count from the end of the array.
Type Parameters
| Type Parameter | Description |
|---|---|
T |
Parameters
| Parameter | Type | Description |
|---|---|---|
arr |
readonly T[] |
The array to retrieve elements from. |
indices |
number[] |
An array of indices specifying the positions of elements to retrieve. |
Returns
T[]
A new array containing the elements at the specified indices.