peach a19a732be8 commit message 2 anos atrás
..
lib a19a732be8 commit message 2 anos atrás
src a19a732be8 commit message 2 anos atrás
LICENSE a19a732be8 commit message 2 anos atrás
README.md a19a732be8 commit message 2 anos atrás
package.json a19a732be8 commit message 2 anos atrás

README.md

regenerator-transform

Transform async/generator functions with regenerator

Installation

$ npm install regenerator-transform

Usage

Via .babelrc (Recommended)

.babelrc

// without options
{
  "plugins": ["regenerator-transform"]
}
// with options
{
  "plugins": [
    ["regenerator-transform", {
      asyncGenerators: false, // true by default
      generators: false, // true by default
      async: false // true by default
    }]
  ]
}

Via CLI

$ babel --plugins regenerator-transform script.js

Via Node API

require("@babel/core").transformSync("code", {
  plugins: ["regenerator-transform"]
});