[Home](./index.md) > [@apextoaster/js-utils](./js-utils.md) > [toArray](./js-utils.toarray.md) ## toArray() function Copy an existing array-like or convert a single value to an array. Signature: ```typescript export declare function toArray(val: Maybe>): Array; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | val | [Maybe](./js-utils.maybe.md)<TVal \| Array<TVal>> | | Returns: Array<TVal>