🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

@babel/plugin-transform-regenerator

Package Overview
Dependencies
Maintainers
4
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-transform-regenerator

Explode async and generator functions into a state machine.

7.27.1
latest
Source
npm
Version published
Weekly downloads
25M
4.54%
Maintainers
4
Weekly downloads
 
Created

What is @babel/plugin-transform-regenerator?

The @babel/plugin-transform-regenerator package is a Babel plugin that enables the transformation of generator functions and async functions into ES5-compatible JavaScript code using the regenerator runtime. It allows developers to use these modern features in environments that do not natively support them.

What are @babel/plugin-transform-regenerator's main functionalities?

Transformation of generator functions

This plugin transforms generator functions into ES5 code by converting the generator syntax into a state machine that is compatible with older JavaScript engines.

function* gen() { yield 1; yield 2; yield 3; }

Transformation of async functions

It also transforms async functions into generator functions and then applies the generator function transformation to ensure compatibility with environments that do not support async/await syntax.

async function foo() { await someAsyncFunction(); }

Other packages similar to @babel/plugin-transform-regenerator

FAQs

Package last updated on 30 Apr 2025

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