You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+4-14Lines changed: 4 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -120,21 +120,11 @@ Chain [styles](#styles) and call the last one as a method with a string argument
120
120
121
121
Multiple arguments will be separated by space.
122
122
123
-
### chalk.enabled
124
-
125
-
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.
126
-
127
-
Chalk is enabled by default unless explicitly disabled via `new chalk.Instance()` or `chalk.level` is `0`.
128
-
129
-
If you need to change this in a reusable module, create a new instance:
130
-
131
-
```js
132
-
constctx=newchalk.Instance({enabled:false});
133
-
```
134
-
135
123
### chalk.level
136
124
137
-
Color support is automatically detected, but you can override it by setting the `level` property. You should however only do this in your own code as it applies globally to all Chalk consumers. When `chalk.level` is greater than `0`, `chalk.enabled` must *also* be `true` for colored output to be produced.
125
+
Specifies the level of color support.
126
+
127
+
Color support is automatically detected, but you can override it by setting the `level` property. You should however only do this in your own code as it applies globally to all Chalk consumers.
138
128
139
129
If you need to change this in a reusable module, create a new instance:
140
130
@@ -170,7 +160,7 @@ Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=
170
160
-`inverse`- Inverse background and foreground colors.
171
161
-`hidden` - Prints the text, but makes it invisible.
172
162
-`strikethrough` - Puts a horizontal line through the center of the text. *(Not widely supported)*
173
-
-`visible`- Prints the text only when Chalk is enabled. Can be useful for things that are purely cosmetic.
163
+
-`visible`- Prints the text only when Chalk has a color level > 0. Can be useful for things that are purely cosmetic.
0 commit comments