unstyle
v0.1.0
Published
Unstyle CLI output
Downloads
169
Readme
Unstyle
Sometimes, really great CLIs output really colorful content, to help you easily take in and unserstand the output at a glance. And sometimes, they don't provide a way to easily get rid of the colors. And sometimes, really great CLIs use third-party tools that output pretty colors, and forget to pass through the option to print plain text. And sometimes, you just don't care and you want those colors gone. And if all of those times are right now, then you have come to the right place.
Install
npm install --global unstyle
Profit
colorful-command | unstyle > output.txt
Want to capture stderr as well?
colorful-command 2>&1 | unstyle
But I just want to do it inside my app.
var unstyle = require('unstyle');
inputStream.pipe(unstyle()).pipe(outputStream);
What are streams? I have a string.
var unstyle = require('unstyle');
var cleanString = unstyle.string(dirtyString);