vlad 6f123ff03e 18.07 | 6 years ago | |
---|---|---|
.. | ||
index.js | 6 years ago | |
package.json | 6 years ago | |
readme.md | 6 years ago |
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.