|
%!s(int64=4) %!d(string=hai) anos | |
---|---|---|
.. | ||
index.js | %!s(int64=4) %!d(string=hai) anos | |
package.json | %!s(int64=4) %!d(string=hai) anos | |
readme.md | %!s(int64=4) %!d(string=hai) anos |
Detect whether a terminal supports color.
Used in the terminal color module chalk.
$ npm install --save has-color
var hasColor = require('has-color');
if (hasColor) {
console.log('Terminal supports color.');
}
It obeys the --color
and --no-color
CLI flags.