has-color
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.
This package has been deprecated
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
437,454
0.2.0
MIT
2.95 kB
4