0.2.0 • Published 6 years ago

has-color v0.2.0

Weekly downloads
722,610
License
MIT
Repository
github
Last release
6 years ago

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