Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@babel/plugin-transform-spread

Package Overview
Dependencies
Maintainers
5
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-transform-spread - npm Package Compare versions

Comparing version 7.0.0-beta.49 to 7.0.0-beta.50

8

package.json
{
"name": "@babel/plugin-transform-spread",
"version": "7.0.0-beta.49",
"version": "7.0.0-beta.50",
"description": "Compile ES2015 spread to ES5",

@@ -12,3 +12,3 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-spread",

"dependencies": {
"@babel/helper-plugin-utils": "7.0.0-beta.49"
"@babel/helper-plugin-utils": "7.0.0-beta.50"
},

@@ -19,5 +19,5 @@ "peerDependencies": {

"devDependencies": {
"@babel/core": "7.0.0-beta.49",
"@babel/helper-plugin-test-runner": "7.0.0-beta.49"
"@babel/core": "7.0.0-beta.50",
"@babel/helper-plugin-test-runner": "7.0.0-beta.50"
}
}

@@ -5,80 +5,16 @@ # @babel/plugin-transform-spread

## Example
See our website [@babel/plugin-transform-spread](https://new.babeljs.io/docs/en/next/babel-plugin-transform-spread.html) for more information.
**In**
## Install
```js
var a = ['a', 'b', 'c'];
Using npm:
var b = [...a, 'foo'];
var c = foo(...a);
```
**Out**
```js
var a = ['a', 'b', 'c'];
var b = a.concat(['foo']);
var c = foo.apply(void 0, a);
```
## Installation
```sh
npm install --save-dev @babel/plugin-transform-spread
npm install --save @babel/plugin-transform-spread
```
## Usage
or using yarn:
### Via `.babelrc` (Recommended)
**.babelrc**
Without options:
```json
{
"plugins": ["@babel/plugin-transform-spread"]
}
```
With options:
```json
{
"plugins": [
["@babel/plugin-transform-spread", {
"loose": true
}]
]
}
```
### Via CLI
```sh
babel --plugins @babel/plugin-transform-spread script.js
yarn add --save @babel/plugin-transform-spread
```
### Via Node API
```javascript
require("@babel/core").transform("code", {
plugins: ["@babel/plugin-transform-spread"]
});
```
## Options
### `loose`
`boolean`, defaults to `false`.
In loose mode, **all** iterables are assumed to be arrays.
## References
* [MDN: Spread syntax](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax)
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc