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

babel-plugin-jscript

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-jscript - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

18

lib/index.js

@@ -18,21 +18,7 @@ "use strict";

FunctionExpression: {
exit: function exit(node, parent) {
exit: function exit(node) {
if (!node.id) return;
node._ignoreUserWhitespace = true;
if (t.isReturnStatement(parent)) {
var parentScopeHasNoBindings = !this.scope.parent || Object.keys(this.scope.parent.bindings).length === 0;
if (parentScopeHasNoBindings) {
// If this FunctionExpression is being returned from a scope
// that has no bindings, then there is no need to wrap it
// with an IIFE, because it's fine if the function name
// leaks into that empty scope (as it will in IE8). This
// clause is mostly to keep the FunctionExpression generated
// below from being transformed again by this plugin.
return;
}
}
return t.callExpression(t.functionExpression(null, [], t.blockStatement([t.returnStatement(node)])), []);
return t.callExpression(t.functionExpression(null, [], t.blockStatement([t.toStatement(node), t.returnStatement(node.id)])), []);
}

@@ -39,0 +25,0 @@ }

2

package.json
{
"name": "babel-plugin-jscript",
"version": "1.0.3",
"version": "1.0.4",
"description": "Babel plugin to fix buggy JScript named function expressions",

@@ -5,0 +5,0 @@ "repository": "babel-plugins/babel-plugin-jscript",

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