Socket
Socket
Sign inDemoInstall

@babel/helper-remap-async-to-generator

Package Overview
Dependencies
55
Maintainers
4
Versions
73
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @babel/helper-remap-async-to-generator

Helper function to remap async functions to generators


Version published
Weekly downloads
22M
decreased by-2.43%
Maintainers
4
Install size
4.44 MB
Created
Weekly downloads
 

Package description

What is @babel/helper-remap-async-to-generator?

The @babel/helper-remap-async-to-generator package is a part of the Babel ecosystem that assists in transforming async functions into generator functions along with a regenerator runtime. This transformation is crucial for supporting async/await syntax in environments that do not natively support these features.

What are @babel/helper-remap-async-to-generator's main functionalities?

Transformation of async functions to generator functions

This feature allows developers to write modern async/await syntax and compile it down to ES2015 generator functions, ensuring compatibility with older JavaScript engines.

async function fetchData() {\n  return await fetch('https://api.example.com/data');\n}\n// Transforms to:\nfunction fetchData() {\n  return _asyncToGenerator(function* () {\n    return yield fetch('https://api.example.com/data');\n  })();\n}

Other packages similar to @babel/helper-remap-async-to-generator

Changelog

Source

v7.22.20 (2023-09-16)

:house: Internal
  • babel-helper-validator-identifier
    • #15973 Remove special-casing of U+200C and U+200D (@nicolo-ribaudo)
  • babel-plugin-transform-dotall-regex
:leftwards_arrow_with_hook: Revert
  • babel-helper-remap-async-to-generator, babel-helper-wrap-function, babel-plugin-proposal-explicit-resource-management, babel-plugin-proposal-function-sent, babel-plugin-transform-async-generator-functions, babel-plugin-transform-async-to-generator, babel-plugin-transform-block-scoping, babel-plugin-transform-class-properties, babel-plugin-transform-classes, babel-plugin-transform-parameters, babel-plugin-transform-runtime, babel-preset-env

Readme

Source

@babel/helper-remap-async-to-generator

Helper function to remap async functions to generators

See our website @babel/helper-remap-async-to-generator for more information.

Install

Using npm:

npm install --save @babel/helper-remap-async-to-generator

or using yarn:

yarn add @babel/helper-remap-async-to-generator

FAQs

Last updated on 16 Sep 2023

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