Skip to content

toArray

Normalization any input to array.

js
// ['hi']
toArray('hi')

// ['hi']
toArray(['hi'])

Type Declarations

Details
ts
/**
 * Convert `Arrayable<T>` to `Array<T>`
 *
 * @see {@link https://s3xysteak.github.io/fnclip/functions/array/toArray/}
 */
export declare function toArray<T>(array?: T | T[] | null | undefined): Array<T>;

Source

Source