Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
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 840,120 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.