shift73k/assets_old/node_modules/regenerator-transform
2022-08-13 07:32:36 -04:00
..
lib progress on migrating to heex templates and font-icons 2022-08-13 07:32:36 -04:00
src progress on migrating to heex templates and font-icons 2022-08-13 07:32:36 -04:00
LICENSE progress on migrating to heex templates and font-icons 2022-08-13 07:32:36 -04:00
package.json progress on migrating to heex templates and font-icons 2022-08-13 07:32:36 -04:00
README.md progress on migrating to heex templates and font-icons 2022-08-13 07:32:36 -04:00

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