Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
babel-plugin-syntax-object-rest-spread
Advanced tools
The babel-plugin-syntax-object-rest-spread package allows Babel to parse the object rest/spread syntax. This syntax feature lets you copy enumerable properties from one object to another using the spread (...) operator and pick up remaining properties that are not explicitly picked up by the destructuring pattern using the rest (...) operator.
Object Spread
Allows an object's own enumerable properties to be copied into a new object. Useful for creating a shallow copy of an object or combining multiple objects into one.
{ ...source }
Object Rest
Allows the remaining own enumerable property keys that are not already picked off by the destructuring pattern to be collected into an object.
{ a, b, ...rest } = object
This package is a plugin that transforms object rest and spread syntax to ES5. It is the evolution of the babel-plugin-syntax-object-rest-spread and includes both the syntax parsing and the transformation, whereas babel-plugin-syntax-object-rest-spread only allows Babel to parse the syntax.
This is a legacy plugin that was used to transform object rest and spread properties for Babel 6. It has been superseded by @babel/plugin-proposal-object-rest-spread in Babel 7.
Allow parsing of object rest/spread.
$ npm install babel-plugin-syntax-object-rest-spread
.babelrc
(Recommended).babelrc
{
"plugins": ["syntax-object-rest-spread"]
}
$ babel --plugins syntax-object-rest-spread script.js
require("babel-core").transform("code", {
plugins: ["syntax-object-rest-spread"]
});
FAQs
Allow parsing of object rest/spread
The npm package babel-plugin-syntax-object-rest-spread receives a total of 1,896,223 weekly downloads. As such, babel-plugin-syntax-object-rest-spread popularity was classified as popular.
We found that babel-plugin-syntax-object-rest-spread 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
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.