npm.io
0.2.0 • Published 8 years ago

has-color

Licence
MIT
Version
0.2.0
Deps
0
Size
3 kB
Vulns
0
Weekly
0
Stars
371
DeprecatedThis package is deprecated

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

Keywords