ascii-ui API documentation > "util/emptyArray"
▸ emptyArray<T>(arr: T[]): T[]
Defined in util/emptyArray.ts:8
Empty an array without having to reassign it with arr = []. It's faster and preserves the same object pointer
Type parameters:
Parameters:
| Param | Type | Description |
|---|---|---|
| arr | T[] |
Array to empty |
Returns: T[]
same, modified array arr