MCPcopy Create free account
hub / github.com/codemix/graph / stripAnsiEscapeCodes

Function stripAnsiEscapeCodes

packages/graph/src/test/testHelpers.ts:33–36  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

31 * Useful for testing stringified output that may contain color codes.
32 */
33export function stripAnsiEscapeCodes(str: string): string {
34 // eslint-disable-next-line no-control-regex
35 return str.replace(/\x1b\[[0-9;]*m/g, "");
36}
37
38/**
39 * Dumps steps as a string with ANSI codes stripped.

Callers 1

dumpStepsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected