Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
@babel/plugin-syntax-async-generators
Advanced tools
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
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.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.