How to use the styles function from chalk

Find comprehensive JavaScript chalk.styles code examples handpicked from public code repositorys.

-1
fork icon48
star icon236
watch icon21

+ 5 other calls in file

118
119
120
121
122
123
124
125
126
127

Detect whether the terminal [supports color](https://github.com/chalk/supports-color). Used internally and handled for you, but exposed for convenience.

Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`.

### chalk.styles

Exposes the styles as [ANSI escape codes](https://github.com/chalk/ansi-styles).

Generally not useful, but you might need just the `.open` or `.close` escape code if you're mixing externally styled strings with your own.
fork icon837
star icon0
watch icon2

+ 3 other calls in file