|
|
il y a 10 ans | |
|---|---|---|
| .. | ||
| index.js | il y a 10 ans | |
| package.json | il y a 10 ans | |
| readme.md | il y a 10 ans | |
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.