Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@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
The npm package @babel/plugin-syntax-async-generators receives a total of 25,901,073 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.