(text: string)
| 375 | * @internal |
| 376 | */ |
| 377 | const stripAnsi = (text: string): string => { |
| 378 | // oxlint-disable-next-line no-control-regex |
| 379 | return text.replace(/\u001B\[[0-9;]*m/g, "") |
| 380 | } |
| 381 | |
| 382 | /** |
| 383 | * Gets the visual length of a string (excluding ANSI codes). |