Bakhtina Sofya b84cb877be 1st comm 2 nedēļas atpakaļ
..
lib b84cb877be 1st comm 2 nedēļas atpakaļ
src b84cb877be 1st comm 2 nedēļas atpakaļ
LICENSE b84cb877be 1st comm 2 nedēļas atpakaļ
README.md b84cb877be 1st comm 2 nedēļas atpakaļ
package.json b84cb877be 1st comm 2 nedēļas atpakaļ

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