pixelnode/node_modules/supports-color/readme.md

45 lines
682 B
Markdown
Raw Permalink Normal View History

2018-04-04 12:31:55 +02:00
# supports-color [![Build Status](https://travis-ci.org/sindresorhus/supports-color.svg?branch=master)](https://travis-ci.org/sindresorhus/supports-color)
> Detect whether a terminal supports color
## Install
```sh
$ npm install --save supports-color
```
## Usage
```js
var supportsColor = require('supports-color');
if (supportsColor) {
console.log('Terminal supports color');
}
```
It obeys the `--color` and `--no-color` CLI flags.
## CLI
```sh
$ npm install --global supports-color
```
```
$ supports-color --help
Usage
supports-color
Exits with code 0 if color is supported and 1 if not
```
## License
MIT © [Sindre Sorhus](http://sindresorhus.com)