strip-ansi

Strip ANSI escape codes (used for colorizing strings in the terminal)

npm install strip-ansi
19 112 downloads in the last day
108 680 downloads in the last week
444 980 downloads in the last month

strip-ansi Build Status

Strip ANSI escape codes (used for colorizing strings in the terminal)

Used in the terminal color module chalk.

Install

$ npm install --save strip-ansi

Usage

var stripAnsi = require('strip-ansi');

stripAnsi('\x1b[4mcake\x1b[0m');
//=> 'cake'

CLI

You can also use it as a CLI app by installing it globally:

$ npm install --global strip-ansi

Usage

$ strip-ansi --help

strip-ansi <input-file>
or
cat <input-file> | strip-ansi

License

MIT © Sindre Sorhus

npm loves you