babel/packages/babel-plugin-transform-async-to-generator
magic-akari 910ece5e2a
Optimize transform-async-to-generator output (#14122)
* Optimize `transform-async-to-generator` output

- remove wrapper if the function length is zero.
- remove wrapper if the `assumptions.ignoreFunctionLength` is `true`.

* chore: update test case and code style

* chore: add test
2022-01-08 21:01:20 +01:00
..
2017-03-25 21:46:16 -04:00
2021-12-31 00:13:43 +00:00

@babel/plugin-transform-async-to-generator

Turn async functions into ES2015 generators

See our website @babel/plugin-transform-async-to-generator for more information.

Install

Using npm:

npm install --save-dev @babel/plugin-transform-async-to-generator

or using yarn:

yarn add @babel/plugin-transform-async-to-generator --dev