flattenDeep
Import from @varavel/vdl-plugin-sdk/utils/arrays.
Flattens all depths of a nested array.
Type Parameters
| Type Parameter | Description |
|---|---|
T |
The type of elements within the array. |
Parameters
| Parameter | Type | Description |
|---|---|---|
arr |
readonly T[] |
The array to flatten. |
Returns
ExtractNestedArrayType\<T>[]
A new array that has been flattened.