From 83615f2ed655486641ac13814cd21b36bd9cdfd3 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Thu, 5 Nov 2015 13:12:34 +0700 Subject: [PATCH] clarify docs about using console.log fixes #89 --- readme.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/readme.md b/readme.md index 6bc57b9..17ff97c 100644 --- a/readme.md +++ b/readme.md @@ -42,13 +42,18 @@ $ npm install --save chalk ## Usage -Chalk comes with an easy to use composable API where you just chain and nest the styles you want. - ```js const chalk = require('chalk'); -// style a string -chalk.blue('Hello world!'); +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. + +Here without `console.log` for purity. + +```js +const chalk = require('chalk'); // combine styled and normal strings chalk.blue('Hello') + 'World' + chalk.red('!');