Socket
Socket
Sign inDemoInstall

@babel/plugin-transform-spread

Package Overview
Dependencies
1
Maintainers
5
Versions
80
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.2.0 to 7.2.2

10

lib/index.js

@@ -88,5 +88,5 @@ "use strict";

const nodes = build(elements, scope);
const first = nodes.shift();
let first = nodes[0];
if (nodes.length === 0 && first !== elements[0].argument) {
if (nodes.length === 1 && first !== elements[0].argument) {
path.replaceWith(first);

@@ -96,2 +96,8 @@ return;

if (!_core().types.isArrayExpression(first)) {
first = _core().types.arrayExpression([]);
} else {
nodes.shift();
}
path.replaceWith(_core().types.callExpression(_core().types.memberExpression(first, _core().types.identifier("concat")), nodes));

@@ -98,0 +104,0 @@ },

4

package.json
{
"name": "@babel/plugin-transform-spread",
"version": "7.2.0",
"version": "7.2.2",
"description": "Compile ES2015 spread to ES5",

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

"devDependencies": {
"@babel/core": "^7.2.0",
"@babel/core": "^7.2.2",
"@babel/helper-plugin-test-runner": "^7.0.0"
}
}
SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc