Security News
The Dark Side of Open Source
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
@babel/plugin-proposal-object-rest-spread
Advanced tools
Package description
The @babel/plugin-proposal-object-rest-spread package allows developers to use the object rest and spread properties syntax in their JavaScript code. This syntax is part of the ECMAScript proposal and enables more concise and readable code when copying properties from one object to another or collecting the remaining properties of an object after certain properties have been extracted.
Object Spread
Allows an object's own enumerable properties to be copied into a new object. This is useful for creating a new object with the same properties as an existing object or for combining multiple objects.
{ ...source }
Object Rest
Enables extracting properties from objects and binding the remaining properties to a new object. This is useful for omitting certain properties from an object and keeping the rest.
const { a, b, ...rest } = source;
A polyfill for Object.assign which is a method used to copy the values of all enumerable own properties from one or more source objects to a target object. It is similar to the spread operator but does not allow for rest properties and is not a Babel plugin.
A library for deep (recursive) merging of objects. It is similar to object spread in that it allows for combining objects, but it goes deeper, merging nested objects as well, which is not something object spread syntax does by default.
Part of the Lodash library, this function is used for a deep merge of own and inherited enumerable properties of source objects into the destination object. It's more powerful than the spread operator in terms of deep merging capabilities.
A port of the classic jQuery.extend() method to Node.js. It can be used to copy properties from one or more source objects to a target object, similar to the spread operator, but it is not specifically a Babel plugin and does not handle the rest properties syntax.
Changelog
v7.20.7 (2022-12-22)
babel-helper-member-expression-to-functions
, babel-helper-replace-supers
, babel-plugin-proposal-class-properties
, babel-plugin-transform-classes
babel-helpers
, babel-plugin-proposal-class-properties
, babel-plugin-transform-classes
, babel-plugin-transform-object-super
babel-parser
, babel-plugin-transform-typescript
babel-traverse
.parentPath
after rename in SwitchCase
(@nicolo-ribaudo)babel-plugin-transform-typescript
, babel-traverse
babel-plugin-transform-block-scoping
babel-plugin-proposal-async-generator-functions
, babel-preset-env
for await
with shadowed variables (@liuxingbaoyu)babel-generator
, babel-plugin-proposal-optional-chaining
(a ?? b) as T
(@liuxingbaoyu)babel-plugin-transform-react-jsx
, babel-types
JSXText
(@liuxingbaoyu)babel-core
, babel-helpers
, babel-plugin-transform-computed-properties
, babel-runtime-corejs2
, babel-runtime-corejs3
, babel-runtime
babel-helper-member-expression-to-functions
, babel-helper-replace-supers
, babel-plugin-proposal-class-properties
, babel-plugin-transform-classes
babel-generator
TSEnumMember
(@liuxingbaoyu)babel-plugin-transform-block-scoping
, babel-traverse
babel-helper-define-map
, babel-plugin-transform-property-mutators
@babel/helper-define-map
(@nicolo-ribaudo)babel-core
, babel-plugin-proposal-class-properties
, babel-plugin-transform-block-scoping
, babel-plugin-transform-classes
, babel-plugin-transform-destructuring
, babel-plugin-transform-parameters
, babel-plugin-transform-regenerator
, babel-plugin-transform-runtime
, babel-preset-env
, babel-traverse
transform-block-scoping
plugin (@nicolo-ribaudo)babel-helper-compilation-targets
getTargets
(@liuxingbaoyu)Readme
Compile object rest and spread to ES5
See our website @babel/plugin-proposal-object-rest-spread for more information.
Using npm:
npm install --save-dev @babel/plugin-proposal-object-rest-spread
or using yarn:
yarn add @babel/plugin-proposal-object-rest-spread --dev
FAQs
Compile object rest and spread to ES5
The npm package @babel/plugin-proposal-object-rest-spread receives a total of 15,923,247 weekly downloads. As such, @babel/plugin-proposal-object-rest-spread popularity was classified as popular.
We found that @babel/plugin-proposal-object-rest-spread demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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 Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.