How to use the Instance function from chalk

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

137
138
139
140
141
142
143
144
145
146

### chalk.enabled

Color support is automatically detected, as is the level (see `chalk.level`). However, if you'd like to simply enable/disable Chalk, you can do so via the `.enabled` property. When `chalk.enabled` is `true`, `chalk.level` must *also* be greater than `0` for colored output to be produced.

Chalk is enabled by default unless explicitly disabled via `new chalk.Instance()` or `chalk.level` is `0`.

If you need to change this in a reusable module, create a new instance:

```js
fork icon2
star icon16
watch icon6

+ 11 other calls in file