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.10.0-alpha.7b176463 to 6.10.0-alpha.8b905991

23

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

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

CallExpression(path, state) {
var callee = path.get("callee");
const callee = path.get("callee");
if (!callee.isMemberExpression()) return;

@@ -42,3 +43,3 @@

function isGlobalConsoleId(id) {
var name = "console";
const name = "console";
return id.isIdentifier({

@@ -50,12 +51,10 @@ name

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

@@ -71,3 +70,3 @@ if (isGlobalConsoleId(object)) return true;

function isIncludedConsoleBind(memberExpr, excludeArray) {
var object = memberExpr.get("object");
const object = memberExpr.get("object");
if (!object.isMemberExpression()) return false;

@@ -74,0 +73,0 @@ if (isExcluded(object.get("property"), excludeArray)) return false;

{
"name": "babel-plugin-transform-remove-console",
"version": "6.10.0-alpha.7b176463",
"version": "6.10.0-alpha.8b905991",
"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