babel-plugin-transform-es2015-destructuring
Advanced tools
Comparing version 6.3.13 to 6.3.15
@@ -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; |
{ | ||
"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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18196
413
1