MCPcopy Create free account
hub / github.com/antfu/utils / flattenArrayable

Function flattenArrayable

src/array.ts:19–21  ·  view source on GitHub ↗
(array?: Nullable<Arrayable<T | Array<T>>>)

Source from the content-addressed store, hash-verified

17 * @category Array
18 */
19export function flattenArrayable<T>(array?: Nullable<Arrayable<T | Array<T>>>): Array<T> {
20 return toArray(array).flat(1) as Array<T>
21}
22
23/**
24 * Use rest arguments to merge arrays

Callers 2

sumFunction · 0.90
array.test.tsFile · 0.90

Calls 1

toArrayFunction · 0.85

Tested by

no test coverage detected