fleet-docs/node_modules/regenerator-transform
divya-mohan0209 9de94a264c Initial commit 2022-09-22 09:54:31 +05:30
..
lib Initial commit 2022-09-22 09:54:31 +05:30
src Initial commit 2022-09-22 09:54:31 +05:30
LICENSE Initial commit 2022-09-22 09:54:31 +05:30
README.md Initial commit 2022-09-22 09:54:31 +05:30
package.json Initial commit 2022-09-22 09:54:31 +05:30

README.md

regenerator-transform

Transform async/generator functions with regenerator

Installation

$ npm install regenerator-transform

Usage

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