Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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"]
});
```