Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@babel/plugin-syntax-async-generators
Advanced tools
Allow parsing of async generator functions
The @babel/plugin-syntax-async-generators package allows Babel to parse code that uses async generator functions. These are functions that can pause execution and resume asynchronously, making them useful for handling streams of data or other asynchronous operations in a more readable way than using Promises or callbacks alone.
Parsing async generator functions
This code defines an async generator function that yields numbers from 0 to 2. The @babel/plugin-syntax-async-generators package allows Babel to understand and parse this syntax.
async function* asyncGenerator() {
var i = 0;
while (i < 3) {
yield i++;
}
}
This package transforms async functions to generator functions. While @babel/plugin-syntax-async-generators only enables parsing of async generator syntax, @babel/plugin-transform-async-to-generator goes further by transforming async functions into a form that can be executed in environments that do not support async functions natively.
A Babel preset that includes @babel/plugin-syntax-async-generators among many other plugins. It allows you to use the latest JavaScript without needing to micromanage which syntax transforms (and thus plugins) are needed for your target environment. It compares to @babel/plugin-syntax-async-generators by providing a broader range of JavaScript feature support, including but not limited to async generators.
Allow parsing of async generator functions
See our website @babel/plugin-syntax-async-generators for more information.
Using npm:
npm install --save-dev @babel/plugin-syntax-async-generators
or using yarn:
yarn add @babel/plugin-syntax-async-generators --dev
FAQs
Allow parsing of async generator functions
The npm package @babel/plugin-syntax-async-generators receives a total of 25,541,166 weekly downloads. As such, @babel/plugin-syntax-async-generators popularity was classified as popular.
We found that @babel/plugin-syntax-async-generators demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.