Socket
Socket
Sign inDemoInstall

@babel/helper-split-export-declaration

Package Overview
Dependencies
Maintainers
4
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/helper-split-export-declaration - npm Package Compare versions

Comparing version 7.18.6 to 7.21.4-esm

lib/index.js.map

14

lib/index.js

@@ -7,5 +7,3 @@ "use strict";

exports.default = splitExportDeclaration;
var _t = require("@babel/types");
const {

@@ -19,3 +17,2 @@ cloneNode,

} = _t;
function splitExportDeclaration(exportDeclaration) {

@@ -25,3 +22,2 @@ if (!exportDeclaration.isExportDeclaration() || exportDeclaration.isExportAllDeclaration()) {

}
if (exportDeclaration.isExportDefaultDeclaration()) {

@@ -33,7 +29,5 @@ const declaration = exportDeclaration.get("declaration");

let needBindingRegistration = false;
if (!id) {
needBindingRegistration = true;
id = scope.generateUidIdentifier("default");
if (standaloneDeclaration || declaration.isFunctionExpression() || declaration.isClassExpression()) {

@@ -43,3 +37,2 @@ declaration.node.id = cloneNode(id);

}
const updatedDeclaration = standaloneDeclaration ? declaration.node : variableDeclaration("var", [variableDeclarator(cloneNode(id), declaration.node)]);

@@ -49,7 +42,5 @@ const updatedExportDeclaration = exportNamedDeclaration(null, [exportSpecifier(cloneNode(id), identifier("default"))]);

exportDeclaration.replaceWith(updatedDeclaration);
if (needBindingRegistration) {
scope.registerDeclaration(exportDeclaration);
}
return exportDeclaration;

@@ -59,3 +50,2 @@ } else if (exportDeclaration.get("specifiers").length > 0) {

}
const declaration = exportDeclaration.get("declaration");

@@ -70,2 +60,4 @@ const bindingIdentifiers = declaration.getOuterBindingIdentifiers();

return exportDeclaration;
}
}
//# sourceMappingURL=index.js.map
{
"name": "@babel/helper-split-export-declaration",
"version": "7.18.6",
"version": "7.21.4-esm",
"description": "",

@@ -17,3 +17,3 @@ "repository": {

"dependencies": {
"@babel/types": "^7.18.6"
"@babel/types": "^7.21.4-esm"
},

@@ -20,0 +20,0 @@ "engines": {

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