()
| 70 | } |
| 71 | |
| 72 | export function createAlignedTextWidth<T extends string>(): [ |
| 73 | getPaddedText: (text: string) => T, |
| 74 | updateWidth: (text: string) => number, |
| 75 | ] { |
| 76 | let width = 0 |
| 77 | return [text => text.padEnd(width) as T, text => (width = Math.max(text.length, width))] |
| 78 | } |
| 79 | |
| 80 | export function paddedForEach<T, I extends string>( |
| 81 | list: readonly T[], |
no outgoing calls
no test coverage detected
searching dependent graphs…