clarify docs about using console.log

fixes #89
This commit is contained in:
Sindre Sorhus 2015-11-05 13:12:34 +07:00
parent ed6e7d56da
commit 83615f2ed6

View file

@ -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('!');