* Strip ANSI escape codes from text
(text: string)
| 164 | * Strip ANSI escape codes from text |
| 165 | */ |
| 166 | function stripAnsiCodes(text: string): string { |
| 167 | // eslint-disable-next-line no-control-regex |
| 168 | return text.replace(/\x1b\[[0-9;]*m/g, '').replace(/\x1b\[[0-9;]*[A-Za-z]/g, '') |
| 169 | } |
| 170 | |
| 171 | /** |
| 172 | * Format ISO timestamp into readable time |