itcast bd67f780cf 完成 10 months ago
..
lib bd67f780cf 完成 10 months ago
src bd67f780cf 完成 10 months ago
LICENSE bd67f780cf 完成 10 months ago
README.md bd67f780cf 完成 10 months ago
package.json bd67f780cf 完成 10 months ago

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