Blame view

node_modules/supports-color/readme.md 823 Bytes
f7563de62   Palak Handa   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
  # supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color)
  
  > Detect whether a terminal supports color
  
  
  ## Install
  
  ```
  $ 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.
  
  For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`.
  
  
  ## Related
  
  - [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module
  - [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
  
  
  ## License
  
  MIT © [Sindre Sorhus](http://sindresorhus.com)