* Pad a string to a display width, accounting for emojis
(str: string, width: number)
| 63 | * Pad a string to a display width, accounting for emojis |
| 64 | */ |
| 65 | function padEnd(str: string, width: number): string { |
| 66 | const currentWidth = displayWidth(str) |
| 67 | const padding = Math.max(0, width - currentWidth) |
| 68 | return str + ' '.repeat(padding) |
| 69 | } |
| 70 | |
| 71 | /** |
| 72 | * List available adapters and/or tests |
no test coverage detected