Socket
Socket
Sign inDemoInstall

@babel/plugin-transform-regenerator

Package Overview
Dependencies
57
Maintainers
4
Versions
78
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @babel/plugin-transform-regenerator

Explode async and generator functions into a state machine.


Version published
Weekly downloads
23M
decreased by-0.06%
Maintainers
4
Install size
10.6 MB
Created
Weekly downloads
 

Package description

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

Changelog

Source

v7.20.5 (2022-11-28)

:eyeglasses: Spec Compliance
  • babel-helpers, babel-plugin-transform-destructuring, babel-plugin-transform-modules-commonjs, babel-preset-env, babel-runtime-corejs2, babel-runtime-corejs3, babel-runtime, babel-traverse
    • #15183 Improve array destructuring spec compliance (@SuperSodaSea)
  • babel-cli, babel-helpers, babel-plugin-proposal-class-properties, babel-plugin-proposal-class-static-block, babel-plugin-transform-classes, babel-plugin-transform-runtime, babel-preset-env
    • #15182 fix: apply toPropertyKey when defining class members (@JLHwung)
  • babel-helper-create-class-features-plugin, babel-helpers, babel-plugin-proposal-decorators, babel-plugin-proposal-private-property-in-object, babel-preset-env, babel-runtime-corejs2, babel-runtime-corejs3, babel-runtime
:bug: Bug Fix
  • babel-parser
  • babel-helper-wrap-function, babel-preset-env, babel-traverse
  • babel-plugin-transform-arrow-functions, babel-plugin-transform-parameters, babel-traverse
    • #15163 fix: Throw error when compiling super() in arrow functions with default / rest parameters (@SuperSodaSea)
  • babel-helpers, babel-node, babel-plugin-proposal-async-generator-functions, babel-plugin-transform-regenerator, babel-preset-env, babel-runtime-corejs2, babel-runtime-corejs3, babel-runtime
  • babel-helper-create-regexp-features-plugin
  • babel-parser, babel-types
  • babel-generator
  • babel-plugin-transform-block-scoping, babel-traverse
:nail_care: Polish
  • babel-generator
  • babel-plugin-transform-block-scoping
:house: Internal

Readme

Source

@babel/plugin-transform-regenerator

Explode async and generator functions into a state machine.

See our website @babel/plugin-transform-regenerator for more information.

Install

Using npm:

npm install --save-dev @babel/plugin-transform-regenerator

or using yarn:

yarn add @babel/plugin-transform-regenerator --dev

FAQs

Last updated on 28 Nov 2022

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc