
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
@babel/plugin-transform-async-generator-functions
Advanced tools
Turn async generator functions into ES2015 generators
The @babel/plugin-transform-async-generator-functions package is a Babel plugin that transforms async generator functions and for-await loops to ES2015/ES6-compatible code. This allows developers to use async generator functions in environments that do not support them natively.
Transformation of async generator functions
This feature allows developers to write async generator functions, which are then transformed into code that can be executed in environments that do not support async generators natively.
async function* asyncGenerator() {
var i = 0;
while (i < 3) {
yield i++;
}
}
Transformation of for-await loops
This feature enables the use of for-await loops to iterate over async iterable objects, which is transformed into a series of promise resolutions compatible with older JavaScript engines.
async function iterateAsyncGenerator() {
for await (const num of asyncGenerator()) {
console.log(num);
}
}
The regenerator-runtime package provides a runtime for Regenerator-compiled generator and async functions. It is similar to @babel/plugin-transform-async-generator-functions in that it allows the use of async functions in older environments, but it is a runtime rather than a compile-time plugin.
This plugin transforms async functions to generator functions. While it does not directly transform async generator functions, it serves a similar purpose in allowing async functions to run in environments that do not support them natively.
Turn async generator functions into ES2015 generators
See our website @babel/plugin-transform-async-generator-functions for more information.
Using npm:
npm install --save-dev @babel/plugin-transform-async-generator-functions
or using yarn:
yarn add @babel/plugin-transform-async-generator-functions --dev
v7.28.0 (2025-07-02)
babel-node
babel-types
babel-compat-data
, babel-preset-env
babel-core
, babel-parser
babel-generator
, babel-parser
babel-plugin-proposal-destructuring-private
, babel-plugin-proposal-do-expressions
, babel-plugin-transform-object-rest-spread
, babel-traverse
, babel-types
babel-parser
, babel-traverse
, babel-types
babel-generator
, babel-plugin-proposal-destructuring-private
, babel-plugin-proposal-discard-binding
, babel-plugin-transform-destructuring
, babel-plugin-transform-explicit-resource-management
, babel-plugin-transform-react-display-name
, babel-types
babel-generator
, babel-parser
, babel-plugin-proposal-destructuring-private
, babel-plugin-transform-block-scoping
, babel-plugin-transform-object-rest-spread
, babel-plugin-transform-typescript
, babel-traverse
, babel-types
babel-helper-globals
, babel-plugin-transform-classes
, babel-traverse
babel-types
babel-compat-data
, babel-plugin-proposal-decorators
, babel-plugin-transform-async-generator-functions
, babel-plugin-transform-json-modules
, babel-plugin-transform-regenerator
, babel-plugin-transform-runtime
, babel-preset-env
, babel-runtime-corejs3
babel-polyfill
packages (@nicolo-ribaudo)FAQs
Turn async generator functions into ES2015 generators
The npm package @babel/plugin-transform-async-generator-functions receives a total of 17,906,026 weekly downloads. As such, @babel/plugin-transform-async-generator-functions popularity was classified as popular.
We found that @babel/plugin-transform-async-generator-functions demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.