
Security News
libxml2 Maintainer Ends Embargoed Vulnerability Reports, Citing Unsustainable Burden
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
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,995,577 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
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.