Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gerard2perez/babel-plugin-transform-koa2-async-to-generator
Turn Koav2 async Syntax to Koav1 generators
https://github.com/gerard2perez/babel-plugin-transform-koa2-async-to-generator
Last synced: 16 days ago
JSON representation
Turn Koav2 async Syntax to Koav1 generators
- Host: GitHub
- URL: https://github.com/gerard2perez/babel-plugin-transform-koa2-async-to-generator
- Owner: gerard2perez
- Created: 2017-01-14T16:32:56.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-14T20:24:52.000Z (almost 8 years ago)
- Last Synced: 2024-12-09T19:38:07.053Z (22 days ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# babel-plugin-transform-koa2-async-to-generator
Changes Koa2 async/await syntax to generatos. Turn async functions into ES2015 generators
## Installation
```sh
$ npm install babel-plugin-transform-koa2-async-to-generator
```## Usage
### Via `.babelrc` (Recommended)
**.babelrc**
```json
{
"plugins": ["transform-koa2-async-to-generator"]
}
```### Via CLI
```sh
$ babel --plugins transform-koa2-async-to-generator script.js
```### Via Node API
```javascript
require("babel-core").transform("code", {
plugins: ["transform-koa2-async-to-generator"]
});
```