Skip to content

Latest commit

 

History

History
 
 

babel-plugin-transform-regenerator

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

babel-plugin-transform-regenerator

Transform async/generator functions with regenerator

Installation

$ npm install babel-plugin-transform-regenerator

Usage

Via .babelrc (Recommended)

.babelrc

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

Via CLI

$ babel --plugins transform-regenerator script.js

Via Node API

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