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

babel-plugin-debug-tools

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-debug-tools - npm Package Compare versions

Comparing version 1.0.19 to 1.0.20

25

lib/index.js

@@ -73,3 +73,3 @@ "use strict";

})) {
transpileOthers();
transpileCloning();
} else if (property.isIdentifier({

@@ -82,3 +82,15 @@ name: 'TRACE'

path.get('expression').replaceWith(t.callExpression(t.clone(arg0), []));
} else throw path.buildCodeFrameError("Invalid command");
} else {
const method = property.node;
let isCustom = false;
if (t.isIdentifier(method)) {
if (/^[a-z]\w+$/.test(method.name)) {
isCustom = true;
transpileCustom();
}
}
if (!isCustom) throw path.buildCodeFrameError("Invalid command");
}
}

@@ -161,6 +173,13 @@ }

function transpileOthers() {
function transpileCloning() {
path.get('expression').replaceWith(t.clone(expr.node));
}
function transpileCustom() {
const codes = t.arrayExpression(expr.node.arguments.map(arg => t.stringLiteral((0, _generator.default)(t.clone(arg)).code)));
const values = t.arrayExpression(expr.node.arguments.map(arg => t.clone(arg)));
const nexpr = t.callExpression(t.clone(callee.node), [calleeLoc(), codes, values]);
path.get('expression').replaceWith(nexpr);
}
function calleeLoc() {

@@ -167,0 +186,0 @@ const loc = callee.node.loc;

2

package.json
{
"name": "babel-plugin-debug-tools",
"version": "1.0.19",
"version": "1.0.20",
"description": "Helpers for debug Javascript Applications",

@@ -5,0 +5,0 @@ "repository": {

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