MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / stripAnsiCodes

Function stripAnsiCodes

scripts/tmux/tmux-viewer/gif-exporter.ts:166–169  ·  view source on GitHub ↗

* Strip ANSI escape codes from text

(text: string)

Source from the content-addressed store, hash-verified

164 * Strip ANSI escape codes from text
165 */
166function 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

Callers 1

renderFrameFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected