Function stripAnsiCode

  • Remove ANSI escape codes from the string.

    Parameters

    • string: string

      The text to remove ANSI escape codes from

    Returns string

    The text without ANSI escape codes

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

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