This package has been deprecated

Author message:

Renamed to `supports-color`

has-color

0.2.0 • Public • Published

has-color Build Status

Detect whether a terminal supports color.

Used in the terminal color module chalk.

Install

$ npm install --save has-color

Usage

var hasColor = require('has-color');
 
if (hasColor) {
    console.log('Terminal supports color.');
}

It obeys the --color and --no-color CLI flags.

License

MIT © Sindre Sorhus

Package Sidebar

Install

npm i has-color

Weekly Downloads

542,514

Version

0.2.0

License

MIT

Unpacked Size

2.95 kB

Total Files

4

Last publish

Collaborators

  • sindresorhus