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

babel-plugin-transform-remove-console

Package Overview
Dependencies
Maintainers
5
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-remove-console - npm Package Compare versions

Comparing version 6.9.0-alpha.6ae655c0 to 6.9.0-alpha.6ceffb8d

18

lib/index.js
"use strict";
module.exports = function ({ types: t }) {
module.exports = function (_ref) {
var t = _ref.types;
return {

@@ -8,3 +10,3 @@ name: "transform-remove-console",

CallExpression(path, state) {
const callee = path.get("callee");
var callee = path.get("callee");

@@ -40,3 +42,3 @@ if (!callee.isMemberExpression()) return;

function isGlobalConsoleId(id) {
const name = "console";
var name = "console";
return id.isIdentifier({ name }) && !id.scope.getBinding(name) && id.scope.hasGlobal(name);

@@ -46,8 +48,10 @@ }

function isExcluded(property, excludeArray) {
return excludeArray && excludeArray.some(name => property.isIdentifier({ name }));
return excludeArray && excludeArray.some(function (name) {
return property.isIdentifier({ name });
});
}
function isIncludedConsole(memberExpr, excludeArray) {
const object = memberExpr.get("object");
const property = memberExpr.get("property");
var object = memberExpr.get("object");
var property = memberExpr.get("property");

@@ -62,3 +66,3 @@ if (isExcluded(property, excludeArray)) return false;

function isIncludedConsoleBind(memberExpr, excludeArray) {
const object = memberExpr.get("object");
var object = memberExpr.get("object");

@@ -65,0 +69,0 @@ if (!object.isMemberExpression()) return false;

{
"name": "babel-plugin-transform-remove-console",
"version": "6.9.0-alpha.6ae655c0",
"version": "6.9.0-alpha.6ceffb8d",
"description": "Remove all console.* calls.",

@@ -5,0 +5,0 @@ "keywords": [

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