strip-ansi-control-characters
Strips ANSI Control Characters from string or stream.
Use cases
If you spawn a child process in NodeJS with inherit
or
pipe
-> process.std{out,err}
as stdio
, the child process can clear
terminal screen or mangle information printed by your application.
This package allows you to show output from child process with all colors
and formatting but without those pesky clear screen or clear line
control characters.
API
: stringfunction stripFromStream(bufferEncoding: string = 'utf8'): stream.Duplex
Usage
const stripAnsiCc = ;const child_process = ; const ps = child_process; psstdout;psstderr;
License
MIT license - file included in repo