![Malicious npm Package Typosquats react-login-page to Deploy Keylogger](https://cdn.sanity.io/images/cgdhsj6q/production/007b21d9cf9e03ae0bb3f577d1bd59b9d715645a-1024x1024.webp?w=400&fit=max&auto=format)
Research
Security News
Malicious npm Package Typosquats react-login-page to Deploy Keylogger
Socket researchers unpack a typosquatting package with malicious code that logs keystrokes and exfiltrates sensitive data to a remote server.
babel-plugin-transform-es2015-destructuring
Advanced tools
Package description
The babel-plugin-transform-es2015-destructuring package is a Babel plugin that transforms ES2015 destructuring syntax into ES5 code. This allows developers to use modern JavaScript destructuring features while maintaining compatibility with older JavaScript environments.
Array Destructuring
Transforms array destructuring syntax into ES5 code. This allows you to extract values from arrays and assign them to variables in a concise manner.
const [a, b] = [1, 2];
Object Destructuring
Transforms object destructuring syntax into ES5 code. This allows you to extract properties from objects and assign them to variables in a concise manner.
const { x, y } = { x: 1, y: 2 };
Nested Destructuring
Transforms nested destructuring syntax into ES5 code. This allows you to extract nested properties from objects and assign them to variables.
const { a: { b } } = { a: { b: 1 } };
Default Values
Transforms destructuring with default values into ES5 code. This allows you to assign default values to variables if the property is undefined.
const { a = 10 } = {};
This package is a more general plugin that transforms destructuring syntax for both arrays and objects. It is similar to babel-plugin-transform-es2015-destructuring but is not limited to ES2015 syntax.
This package transforms ES2015 parameter syntax, including default parameters and rest parameters. While it does not focus solely on destructuring, it complements destructuring transformations by handling parameter-related syntax.
This package transforms ES2015 spread syntax for arrays and objects. It is related to destructuring as both features are often used together to handle complex data structures in a concise manner.
Readme
Compile ES2015 destructuring to ES5
$ npm install babel-plugin-transform-es2015-destructuring
.babelrc
(Recommended).babelrc
{
"plugins": ["transform-es2015-destructuring"]
}
$ babel --plugins transform-es2015-destructuring script.js
require("babel-core").transform("code", {
plugins: ["transform-es2015-destructuring"]
});
FAQs
Unknown package
The npm package babel-plugin-transform-es2015-destructuring receives a total of 814,683 weekly downloads. As such, babel-plugin-transform-es2015-destructuring popularity was classified as popular.
We found that babel-plugin-transform-es2015-destructuring 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
Socket researchers unpack a typosquatting package with malicious code that logs keystrokes and exfiltrates sensitive data to a remote server.
Security News
The JavaScript community has launched the e18e initiative to improve ecosystem performance by cleaning up dependency trees, speeding up critical parts of the ecosystem, and documenting lighter alternatives to established tools.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.