1
0
mirror of https://github.com/thangisme/notes.git synced 2024-06-26 05:35:34 +00:00
notes/node_modules/chalk/node_modules/supports-color/readme.md
Patrick Marsceill b7b0d0d7bf
Initial commit
2017-03-09 13:16:08 -05:00

823 B

supports-color Build Status

Detect whether a terminal supports color

Install

$ npm install --save supports-color

Usage

var supportsColor = require('supports-color');

if (supportsColor) {
	console.log('Terminal supports color');
}

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

For situations where using --color is not possible, add an environment variable FORCE_COLOR with any value to force color. Trumps --no-color.

License

MIT © Sindre Sorhus