Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gerard2perez/babel-helper-remap-koa2-async-to-generator
https://github.com/gerard2perez/babel-helper-remap-koa2-async-to-generator
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/gerard2perez/babel-helper-remap-koa2-async-to-generator
- Owner: gerard2perez
- Created: 2017-01-14T16:35:17.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-15T00:31:43.000Z (almost 8 years ago)
- Last Synced: 2024-11-19T22:46:29.728Z (about 1 month ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# babel-helper-remap-koa2-async-to-generator
Turn async functions into ES2015 generators (Koav2 -> Koav1).
## Installation
```sh
$ npm install babel-helper-remap-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"]
});
```