Skip to content

Commit

Permalink
Merge pull request babel#5659 from aretecode/patch-1
Browse files Browse the repository at this point in the history
[Doc PR] naming fix in example
  • Loading branch information
existentialism committed Apr 25, 2017
2 parents fce92fa + b4f3d94 commit 8895828
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/babel-core/README.md
Expand Up @@ -65,9 +65,9 @@ babel.transformFileSync("filename.js", options).code;
Given, an [AST](https://astexplorer.net/), transform it.

```js
const code = "if (true) return;";
const ast = babylon.parse(code, { allowReturnOutsideFunction: true });
const { code, map, ast } = babel.transformFromAst(ast, code, options);
const sourceCode = "if (true) return;";
const parsedAst = babylon.parse(sourceCode, { allowReturnOutsideFunction: true });
const { code, map, ast } = babel.transformFromAst(parsedAst, sourceCode, options);
```

## Options
Expand Down

0 comments on commit 8895828

Please sign in to comment.