Rick Waldron 3a6fdca069 Make all packages/*/README.md descriptions consistent.
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-05-31 10:24:26 -04:00

759 B

babel-plugin-syntax-async-generators

Allow parsing of async generator functions.

Example

Syntax

async function* agf() {
  await 1;
}
async function f() {
  for await (let x of y) {
    g(x);
  }
}

Installation

npm install --save-dev babel-plugin-syntax-async-generators

Usage

.babelrc

{
  "plugins": ["syntax-async-generators"]
}

Via CLI

babel --plugins syntax-async-generators script.js

Via Node API

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

References