docs(stderr): revert example change, only notice instead
This commit is contained in:
parent
9223dac310
commit
5fd274a799
1 changed files with 2 additions and 4 deletions
|
|
@ -55,17 +55,15 @@ $ npm install chalk
|
|||
## Usage
|
||||
|
||||
```js
|
||||
// for stdout: console.log, console.info, console.debug
|
||||
const chalk = require('chalk');
|
||||
// for stderr: console.error, console.warn
|
||||
const cherr = require('chalk/stderr');
|
||||
|
||||
console.log(chalk.blue('Hello world!'));
|
||||
console.error(cherr.red('Oh, colored error!'));
|
||||
```
|
||||
|
||||
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` or `console.warn`) use `require('chalk/stderr')`
|
||||
|
||||
```js
|
||||
const chalk = require('chalk');
|
||||
const log = console.log;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue