Socket
Socket
Sign inDemoInstall

babel-plugin-transform-es2015-destructuring

Package Overview
Dependencies
Maintainers
6
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-es2015-destructuring - npm Package Compare versions

Comparing version 6.18.0 to 6.19.0

54

lib/index.js

@@ -346,4 +346,4 @@ "use strict";

ForXStatement: function ForXStatement(path, file) {
var node = path.node;
var scope = path.scope;
var node = path.node,
scope = path.scope;

@@ -390,4 +390,4 @@ var left = node.left;

CatchClause: function CatchClause(_ref6, file) {
var node = _ref6.node;
var scope = _ref6.scope;
var node = _ref6.node,
scope = _ref6.scope;

@@ -413,4 +413,4 @@ var pattern = node.param;

AssignmentExpression: function AssignmentExpression(path, file) {
var node = path.node;
var scope = path.scope;
var node = path.node,
scope = path.scope;

@@ -448,5 +448,5 @@ if (!t.isPattern(node.left)) return;

VariableDeclaration: function VariableDeclaration(path, file) {
var node = path.node;
var scope = path.scope;
var parent = path.parent;
var node = path.node,
scope = path.scope,
parent = path.parent;

@@ -510,2 +510,38 @@ if (t.isForXStatement(parent)) return;

for (var _iterator6 = nodesOut, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : (0, _getIterator3.default)(_iterator6);;) {
var _ref8;
if (_isArray6) {
if (_i6 >= _iterator6.length) break;
_ref8 = _iterator6[_i6++];
} else {
_i6 = _iterator6.next();
if (_i6.done) break;
_ref8 = _i6.value;
}
var nodeOut = _ref8;
if (!nodeOut.declarations) continue;
for (var _iterator7 = nodeOut.declarations, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : (0, _getIterator3.default)(_iterator7);;) {
var _ref9;
if (_isArray7) {
if (_i7 >= _iterator7.length) break;
_ref9 = _iterator7[_i7++];
} else {
_i7 = _iterator7.next();
if (_i7.done) break;
_ref9 = _i7.value;
}
var declaration = _ref9;
var name = declaration.id.name;
if (scope.bindings[name]) {
scope.bindings[name].kind = nodeOut.kind;
}
}
}
if (nodesOut.length === 1) {

@@ -512,0 +548,0 @@ path.replaceWith(nodesOut[0]);

2

package.json
{
"name": "babel-plugin-transform-es2015-destructuring",
"version": "6.18.0",
"version": "6.19.0",
"description": "Compile ES2015 destructuring to ES5",

@@ -5,0 +5,0 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-destructuring",

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