25 lines
614 B
Markdown
25 lines
614 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
[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.
|
|
|
|
<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)<!-- --><TVal \| Array<TVal>> | |
|
|
|
|
<b>Returns:</b>
|
|
|
|
Array<TVal>
|
|
|