(list: any[])
| 36 | * Flattens an array. |
| 37 | */ |
| 38 | export function flatten(list: any[]): any[] { |
| 39 | return list.flat(Number.POSITIVE_INFINITY); |
| 40 | } |
| 41 | |
| 42 | export function deepForEach<T>(input: (T | any[])[], fn: (value: T) => void): void { |
| 43 | input.forEach((value) => (Array.isArray(value) ? deepForEach(value, fn) : fn(value))); |
no outgoing calls
no test coverage detected
searching dependent graphs…