Skip to content

Commit

Permalink
docs: [skip ci] update README (#5202)
Browse files Browse the repository at this point in the history
  • Loading branch information
xtuc authored and existentialism committed Jan 24, 2017
1 parent 2a1db1c commit 7fe59c3
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/babel-plugin-transform-regenerator/README.md
Expand Up @@ -34,8 +34,6 @@ function a() {
}
```

[Try in REPL](http://babeljs.io/repl/#?evaluate=true&lineWrap=true&presets=es2015%2Ces2015-loose%2Creact&experimental=false&loose=false&spec=false&code=function%20*range(max%2C%20step)%20%7B%0A%20%20var%20count%20%3D%200%3B%0A%20%20step%20%3D%20step%20%7C%7C%201%3B%0A%20%0A%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20max%3B%20i%20%2B%3D%20step)%20%7B%0A%20%20%20%20count%2B%2B%3B%0A%20%20%20%20yield%20i%3B%0A%20%20%7D%0A%20%0A%20%20return%20count%3B%0A%7D%0A%20%0Avar%20gen%20%3D%20range(20%2C%203)%2C%20info%3B%0A%20%0Awhile%20(!(info%20%3D%20gen.next()).done)%20%7B%0A%20%20console.log(info.value)%3B%0A%7D%0A%20%0Aconsole.log(%22steps%20taken%3A%20%22%20%2B%20info.value)%3B&playground=true)

## Installation

```sh
Expand All @@ -48,12 +46,17 @@ npm install --save-dev babel-plugin-transform-regenerator

**.babelrc**

```js
// without options
Without options:

```json
{
"plugins": ["transform-regenerator"]
}
// with options
```

With options:

````json
{
"plugins": [
["transform-regenerator", {
Expand Down

0 comments on commit 7fe59c3

Please sign in to comment.