source: node_modules/es-toolkit/dist/compat/array/flatten.d.ts@ a762898

Last change on this file since a762898 was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 436 bytes
Line 
1/**
2 * Flattens array up to depth times.
3 *
4 * @template T
5 * @param {ArrayLike<T> | null | undefined} value - The array to flatten.
6 * @param {number} depth - The maximum recursion depth.
7 * @returns {any[]} Returns the new flattened array.
8 *
9 * @example
10 * flatten([1, [2, [3, [4]], 5]], 2);
11 * // => [1, 2, 3, [4], 5]
12 */
13declare function flatten<T>(value: ArrayLike<T | readonly T[]> | null | undefined): T[];
14
15export { flatten };
Note: See TracBrowser for help on using the repository browser.