MCPcopy Index your code
hub / github.com/npmx-dev/npmx.dev / stripAnsi

Function stripAnsi

server/utils/docs/text.ts:20–22  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

18const ANSI_PATTERN = new RegExp(`${ESC}\\[[0-9;]*m`, 'g')
19
20export function stripAnsi(text: string): string {
21 return text.replace(ANSI_PATTERN, '')
22}
23
24/**
25 * Escape HTML special characters.

Callers 2

text.spec.tsFile · 0.90
formatTypeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected