From 5fd274a799dda41fe5961c941beb03d0e10d4b49 Mon Sep 17 00:00:00 2001 From: Pavel Lang Date: Fri, 28 Dec 2018 04:11:14 +0100 Subject: [PATCH] docs(stderr): revert example change, only notice instead --- readme.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/readme.md b/readme.md index 78f0e86..753e8ab 100644 --- a/readme.md +++ b/readme.md @@ -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;