|
|
5 vuotta sitten | |
|---|---|---|
| .. | ||
| index.js | 5 vuotta sitten | |
| package.json | 5 vuotta sitten | |
| readme.md | 5 vuotta sitten | |
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.