Chalk
Chalk copied to clipboard
Detecting non-interactive terminals
I've been previously using a competitor's project that detects the terminal type and can transparently turn off color and style coding when it encounters a non-interactive one (e.g., file redirection).
Since I like the Chalk API much better, it would be cool, if it could do something equivalent.
I believe I originally considered this “out of scope” but let’s face it, there needs to be an easy way to do this.
Not sure about how it should work though.
How about this one https://github.com/mxcl/Chalk/pull/7 ?