MCPcopy
hub / github.com/unjs/consola / stripAnsi

Function stripAnsi

src/utils/string.ts:14–16  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

12 * @returns {string} The text without ANSI escape codes.
13 */
14export function stripAnsi(text: string) {
15 return text.replace(new RegExp(ansiRegex, "g"), "");
16}
17
18/**
19 * Centers a string within a specified total width, padding it with spaces or another specified character.

Callers 2

boxFunction · 0.90
stringWidthFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…