babel-plugin-transform-koa2-async-to-generator
v1.0.1
Published
Turn Koav2 async Syntax to Koav1 generators
Downloads
16
Readme
babel-plugin-transform-koa2-async-to-generator
Changes Koa2 async/await syntax to generatos. Turn async functions into ES2015 generators
Installation
$ npm install babel-plugin-transform-koa2-async-to-generator
Usage
Via .babelrc
(Recommended)
.babelrc
{
"plugins": ["transform-koa2-async-to-generator"]
}
Via CLI
$ babel --plugins transform-koa2-async-to-generator script.js
Via Node API
require("babel-core").transform("code", {
plugins: ["transform-koa2-async-to-generator"]
});