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

babel-plugin-transform-iife-for-debug

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-iife-for-debug - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "babel-plugin-transform-iife-for-debug",
"version": "1.0.0",
"version": "1.0.1",
"description": "",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -11,10 +11,12 @@ const DEBUGGER_TAG = ' @IIFE-for-debug';

let expStm = path.parentPath;
let lc = expStm.node.leadingComments;
if(lc.length) {
lastComment = lc[lc.length - 1];
if(lastComment.value === DEBUGGER_TAG) {
// 注释与箭头函数位置紧挨在一起
if(isSticked(lastComment, path.node)) {
let IIFE_Expression = t.callExpression(path.node, []);
expStm.node.expression = IIFE_Expression;
if(expStm && expStm.node) {
let lc = expStm.node.leadingComments || [];
if(lc.length) {
lastComment = lc[lc.length - 1];
if(lastComment.value === DEBUGGER_TAG) {
// 注释与箭头函数位置紧挨在一起
if(isSticked(lastComment, path.node)) {
let IIFE_Expression = t.callExpression(path.node, []);
expStm.node.expression = IIFE_Expression;
}
}

@@ -21,0 +23,0 @@ }

@@ -21,6 +21,5 @@

// @IIFE-for-debug
() => {
(() => {
test;
};
})();
}

@@ -27,0 +26,0 @@

@@ -21,3 +21,2 @@

// @IIFE-for-debug
() => {

@@ -24,0 +23,0 @@ test

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