babel-plugin-transform-async-to-generator-2

2019-06-14 admin

babel-plugin-transform-async-to-generator-2是什么

什么是babel-plugin-transform-async-to-generator-2,A fork of babel-plugin-transform-async-to-generator, with a little difference that this plugin keeps the original parameter names of an async function.

  • babel-plugin-transform-async-to-generator-2官网:官网
  • babel-plugin-transform-async-to-generator-2源码仓库:源码仓库
  • babel-plugin-transform-async-to-generator-2下载地址:点此下载 点此下载2

babel-plugin-transform-async-to-generator-2使用教程帮助文档

Build Status

babel-plugin-transform-async-to-generator-2

A fork of babel-plugin-transform-async-to-generator, with a little difference that this plugin keeps the original parameter names of an async function.

Installation

$ npm install babel-plugin-transform-async-to-generator-2

Usage

Via .babelrc (Recommended)

.babelrc

{
  "plugins": ["transform-async-to-generator-2"]
}

Via CLI

$ babel --plugins transform-async-to-generator-2 script.js

Via Node API

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

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-67245.html

文章标题:babel-plugin-transform-async-to-generator-2

回到顶部