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.033d9ab6 to 6.9.0-alpha.169f8743

18

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

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

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

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

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

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

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");

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

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

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

{
"name": "babel-plugin-transform-remove-console",
"version": "6.9.0-alpha.033d9ab6",
"version": "6.9.0-alpha.169f8743",
"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