Socket
Socket
Sign inDemoInstall

babel-plugin-syntax-object-rest-spread

Package Overview
Dependencies
0
Maintainers
6
Versions
31
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    babel-plugin-syntax-object-rest-spread

Allow parsing of object rest/spread


Version published
Weekly downloads
1.9M
increased by1.18%
Maintainers
6
Install size
2.09 kB
Created
Weekly downloads
 

Package description

What is babel-plugin-syntax-object-rest-spread?

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.

What are babel-plugin-syntax-object-rest-spread's main functionalities?

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

Other packages similar to babel-plugin-syntax-object-rest-spread

Readme

Source

babel-plugin-syntax-object-rest-spread

Allow parsing of object rest/spread.

Installation

$ npm install babel-plugin-syntax-object-rest-spread

Usage

.babelrc

{
  "plugins": ["syntax-object-rest-spread"]
}

Via CLI

$ babel --plugins syntax-object-rest-spread script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["syntax-object-rest-spread"]
});

Keywords

FAQs

Last updated on 04 Aug 2016

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc