1
0
Fork 0
js-utils/docs/api/js-utils.toarray.md

25 lines
614 B
Markdown

<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [@apextoaster/js-utils](./js-utils.md) &gt; [toArray](./js-utils.toarray.md)
## toArray() function
Copy an existing array-like or convert a single value to an array.
<b>Signature:</b>
```typescript
export declare function toArray<TVal>(val: Maybe<TVal | Array<TVal>>): Array<TVal>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| val | [Maybe](./js-utils.maybe.md)<!-- -->&lt;TVal \| Array&lt;TVal&gt;&gt; | |
<b>Returns:</b>
Array&lt;TVal&gt;