Update readme.md

This commit is contained in:
Sindre Sorhus 2018-12-28 12:27:47 +01:00 committed by GitHub
parent d18dc309a1
commit 7f60a8cfad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,8 +62,6 @@ console.log(chalk.blue('Hello world!'));
Chalk comes with an easy to use composable API where you just chain and nest the styles you want. Chalk comes with an easy to use composable API where you just chain and nest the styles you want.
For output to **stderr** (like `console.error`) use `require('chalk/stderr')`.
```js ```js
const chalk = require('chalk'); const chalk = require('chalk');
const log = console.log; const log = console.log;
@ -178,7 +176,7 @@ Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=
## Output to `stderr` ## Output to `stderr`
Output intended for `stderr` should use `require('chalk/stderr')` instead of `require('chalk')`. It has an identical API, but correctly detects color support for the `stderr` stream. Output intended for [`stderr`](https://nodejs.org/api/process.html#process_process_stderr) (e.g. `console.error()`) should use `require('chalk/stderr')` instead of `require('chalk')`. It has an identical API, but correctly detects color support for the `stderr` stream.
## Styles ## Styles