(s: string)
| 17 | const ANSI_SGR_RE = new RegExp("\\u001b\\[[\\d;]*m", "g"); |
| 18 | |
| 19 | export function stripAnsi(s: string): string { |
| 20 | return s.replace(ANSI_SGR_RE, ""); |
| 21 | } |
| 22 | |
| 23 | /** Length of `s` after ANSI SGR codes are stripped. */ |
| 24 | export function visibleLength(s: string): number { |
no outgoing calls
no test coverage detected