Detect whether a terminal supports color.
Used in the terminal color module chalk.
Install
$ npm install --save has-color
Usage
var hasColor = ; if hasColor console;
It obeys the --color
and --no-color
CLI flags.
Author message:
Renamed to `supports-color`
Detect whether a terminal supports color.
Used in the terminal color module chalk.
$ npm install --save has-color
var hasColor = ; if hasColor console;
It obeys the --color
and --no-color
CLI flags.
npm i has-color
595,496
0.2.0
MIT
2.95 kB
4