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

Function stripAnsi

common/src/util/string.ts:382–384  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

380
381const ansiRegex = /\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~]|\][^\x1B]*\x1B\\?)/g
382export function stripAnsi(str: string): string {
383 return str.replace(ansiRegex, '')
384}
385
386export function includesMatch(
387 array: (string | RegExp)[],

Callers 3

testCLIWithTmuxFunction · 0.85
e2e-cli.test.tsFile · 0.85

Calls

no outgoing calls

Tested by 1

testCLIWithTmuxFunction · 0.68