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

Parameter Type Description
text string  

Returns:

string