Skip to content

Commit

Permalink
clarify docs about using console.log
Browse files Browse the repository at this point in the history
fixes #89
  • Loading branch information
sindresorhus committed Nov 5, 2015
1 parent ed6e7d5 commit 83615f2
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions readme.md
Expand Up @@ -42,14 +42,19 @@ $ npm install --save chalk

## Usage

```js
const chalk = require('chalk');

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');

// style a string
chalk.blue('Hello world!');

// combine styled and normal strings
chalk.blue('Hello') + 'World' + chalk.red('!');

Expand Down

0 comments on commit 83615f2

Please sign in to comment.