FstripANSI
Bun

function

stripANSI

function stripANSI(
input: string
): string;

Remove ANSI escape codes from a string.

@param input

The string to remove ANSI escape codes from.

@returns

The string with ANSI escape codes removed.

import { stripANSI } from "bun";

console.log(stripANSI("\u001b[31mhello\u001b[39m")); // "hello"