expose ast transformer - fixes #263

This commit is contained in:
Sebastian McKenzie
2014-12-10 21:31:27 +11:00
parent f11f364d2c
commit b986a4e482
4 changed files with 45 additions and 14 deletions

View File

@@ -95,6 +95,15 @@ to5.transformFile("filename.js", options, function (err, result) {
});
```
### to5.transform.fromAst(ast, [code], [opts])
```javascript
var result = to5.transform(ast, "var a = 2;", opts);
result.code;
result.map;
result.ast;
```
#### Options
```javascript