Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

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

975,965

version

0.2.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar