Need private packages and team management tools?Check out npm Teams »

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

Install

npm i has-color

DownloadsWeekly Downloads

997,257

Version

0.2.0

License

MIT

Unpacked Size

2.95 kB

Total Files

4

Last publish

Collaborators

  • avatar