
Research
NPM targeted by malware campaign mimicking familiar library names
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
@babel/plugin-transform-object-rest-spread
Advanced tools
Compile object rest and spread to ES5
The @babel/plugin-transform-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 2018 (ES9) specification 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 Properties
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 into one.
{...source}
Object Rest Properties
Enables extracting properties from objects and binding the remaining properties to a new object. This is useful for object destructuring, where you want to separate certain properties from the rest of the properties in an object.
{a, b, ...rest}
This is a legacy Babel plugin that was used before the functionality was included in the official Babel preset. It offers similar functionality to @babel/plugin-transform-object-rest-spread but may not be as up-to-date with the latest Babel versions and ECMAScript specifications.
Compile object rest and spread to ES5
See our website @babel/plugin-transform-object-rest-spread for more information.
Using npm:
npm install --save-dev @babel/plugin-transform-object-rest-spread
or using yarn:
yarn add @babel/plugin-transform-object-rest-spread --dev
v7.27.1 (2025-04-30)
babel-parser
babel-parser
, babel-types
babel-plugin-proposal-destructuring-private
, babel-plugin-proposal-do-expressions
, babel-traverse
babel-helper-wrap-function
, babel-plugin-transform-async-to-generator
babel-helper-remap-async-to-generator
, babel-plugin-transform-async-to-generator
babel-helper-fixtures
, babel-parser
babel-generator
, babel-parser
babel-parser
babel-compat-data
, babel-preset-env
babel-traverse
babel-generator
babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining
, babel-plugin-proposal-decorators
, babel-plugin-transform-arrow-functions
, babel-plugin-transform-class-properties
, babel-plugin-transform-destructuring
, babel-plugin-transform-object-rest-spread
, babel-plugin-transform-optional-chaining
, babel-plugin-transform-parameters
, babel-traverse
babel-runtime-corejs2
, babel-runtime-corejs3
, babel-runtime
regenerator-runtime
dep in @babel/runtime
(@nicolo-ribaudo)babel-compat-data
, babel-preset-env
babel-compat-data
, babel-standalone
babel-register
@babel/register
to cts (@liuxingbaoyu)babel-cli
, babel-compat-data
, babel-core
, babel-generator
, babel-helper-compilation-targets
, babel-helper-fixtures
, babel-helper-module-imports
, babel-helper-module-transforms
, babel-helper-plugin-test-runner
, babel-helper-transform-fixture-test-runner
, babel-helpers
, babel-node
, babel-parser
, babel-plugin-transform-modules-amd
, babel-plugin-transform-modules-commonjs
, babel-plugin-transform-modules-systemjs
, babel-plugin-transform-modules-umd
, babel-plugin-transform-react-display-name
, babel-plugin-transform-regenerator
, babel-plugin-transform-runtime
, babel-plugin-transform-typeof-symbol
, babel-plugin-transform-typescript
, babel-preset-env
, babel-register
, babel-standalone
, babel-types
babel-plugin-transform-regenerator
babel-helpers
, babel-plugin-transform-async-generator-functions
, babel-plugin-transform-regenerator
, babel-preset-env
, babel-runtime-corejs3
babel-helpers
, babel-plugin-transform-regenerator
babel-helpers
babel-helpers
, babel-plugin-transform-modules-commonjs
, babel-runtime-corejs3
interopRequireWildcard
size (@liuxingbaoyu)babel-helpers
, babel-plugin-transform-async-generator-functions
, babel-plugin-transform-regenerator
, babel-preset-env
, babel-runtime-corejs3
regeneratorRuntime
size (@liuxingbaoyu)FAQs
Compile object rest and spread to ES5
The npm package @babel/plugin-transform-object-rest-spread receives a total of 15,846,567 weekly downloads. As such, @babel/plugin-transform-object-rest-spread popularity was classified as popular.
We found that @babel/plugin-transform-object-rest-spread demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
Research
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
Research
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.