( arr: T, )
| 1595 | : never |
| 1596 | |
| 1597 | export async function asyncFlatten<T extends unknown[]>( |
| 1598 | arr: T, |
| 1599 | ): Promise<AsyncFlatten<T>> { |
| 1600 | do { |
| 1601 | arr = (await Promise.all(arr)).flat(Infinity) as any |
| 1602 | } while (arr.some((v: any) => v?.then)) |
| 1603 | return arr as unknown[] as AsyncFlatten<T> |
| 1604 | } |
| 1605 | |
| 1606 | // strip UTF-8 BOM |
| 1607 | export function stripBomTag(content: string): string { |
no outgoing calls
no test coverage detected