babel-plugin-transform-async-to-module-method

6.7.0 • Public • Published

babel-plugin-transform-async-to-module-method

Turn async functions into a Bluebird coroutine

Installation

$ npm install babel-plugin-transform-async-to-module-method

Usage

Via .babelrc (Recommended)

.babelrc

// without options
{
  "plugins": ["transform-async-to-module-method"]
}

// with options
{
  "plugins": [
    ["transform-async-to-module-method", {
      "module": "bluebird",
      "method": "coroutine"
    }]
  ]
}

Via CLI

$ babel --plugins transform-async-to-module-method script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["transform-async-to-module-method"]
});

Readme

Keywords

Package Sidebar

Install

npm i babel-plugin-transform-async-to-module-method@6.7.0

Version

6.7.0

License

MIT

Last publish

Collaborators

  • hzoo
  • loganfsmyth
  • existentialism