Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/terminal > AnsiEscape > removeCodes

AnsiEscape.removeCodes() method

Returns the input text with all ANSI escape codes removed. For example, this is useful when saving colorized console output to a log file.

Signature:

static removeCodes(text: string): string;

Parameters

Parameter

Type

Description

text

string

Returns:

string