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

@babel/plugin-transform-destructuring

Package Overview
Dependencies
Maintainers
4
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 7.0.0 to 7.1.1

23

lib/index.js

@@ -65,10 +65,13 @@ "use strict";

const arrayUnpackVisitor = {
ReferencedIdentifier(path, state) {
if (state.bindings[path.node.name]) {
state.deopt = true;
path.stop();
}
const STOP_TRAVERSAL = {};
const arrayUnpackVisitor = (node, ancestors, state) => {
if (!ancestors.length) {
return;
}
if (_core().types.isIdentifier(node) && _core().types.isReferenced(node, ancestors[ancestors.length - 1]) && state.bindings[node.name]) {
state.deopt = true;
throw STOP_TRAVERSAL;
}
};

@@ -248,3 +251,9 @@

};
this.scope.traverse(arr, arrayUnpackVisitor, state);
try {
_core().types.traverse(arr, arrayUnpackVisitor, state);
} catch (e) {
if (e !== STOP_TRAVERSAL) throw e;
}
return !state.deopt;

@@ -251,0 +260,0 @@ }

{
"name": "@babel/plugin-transform-destructuring",
"version": "7.0.0",
"version": "7.1.1",
"description": "Compile ES2015 destructuring to ES5",
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-destructuring",
"license": "MIT",
"publishConfig": {
"access": "public"
},
"main": "lib/index.js",

@@ -8,0 +11,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

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