stripAnsiCode

import { stripAnsiCode } from "jsr:@ende/fmt/colors";

function

function stripAnsiCode(string: string): string

Remove ANSI escape codes from the string.

string: string

The text to remove ANSI escape codes from

Returns

The text without ANSI escape codes

Example: Usage

import { stripAnsiCode, red } from "@ende/fmt/colors";

console.log(stripAnsiCode(red("Hello, world!")));

Source