Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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

Package Overview
Dependencies
Maintainers
4
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Turn async generator functions into ES2015 generators

  • 8.0.0-alpha.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created

What is @babel/plugin-transform-async-generator-functions?

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.

What are @babel/plugin-transform-async-generator-functions's main functionalities?

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);
  }
}

Other packages similar to @babel/plugin-transform-async-generator-functions

Keywords

FAQs

Package last updated on 20 Jul 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc