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.3.13 to 6.3.15

19

lib/index.js

@@ -378,2 +378,21 @@ "use strict";

visitor: {
ExportNamedDeclaration: function ExportNamedDeclaration(path) {
var declaration = path.get("declaration");
if (!declaration.isVariableDeclaration()) return;
if (!variableDeclarationHasPattern(declaration.node)) return;
var specifiers = [];
for (var _name in path.getOuterBindingIdentifiers(path)) {
var id = t.identifier(_name);
specifiers.push(t.exportSpecifier(id, id));
}
// Split the declaration and export list into two declarations so that the variable
// declaration can be split up later without needing to worry about not being a
// top-level statement.
path.replaceWith(declaration.node);
path.insertAfter(t.exportNamedDeclaration(null, specifiers));
},
ForXStatement: function ForXStatement(path, file) {

@@ -380,0 +399,0 @@ var node = path.node;

2

package.json
{
"name": "babel-plugin-transform-es2015-destructuring",
"version": "6.3.13",
"version": "6.3.15",
"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