Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/node-core-library > 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

ParameterTypeDescription
textstring

Returns:

string