UNPKG

reakit-utils

Version:

Reakit utils

11 lines (10 loc) 258 B
/** * Transforms an array with multiple levels into a flattened one. * * @example * import { flatten } from "reakit-utils"; * * flatten([0, 1, [2, [3, 4], 5], 6]); * // => [0, 1, 2, 3, 4, 5, 6] */ export declare function flatten<T>(array: T[]): T[];