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.b5bafaeb to 6.10.0-alpha.bce578e2

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.b5bafaeb",
"version": "6.10.0-alpha.bce578e2",
"description": "Remove all console.* calls.",

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

@@ -22,3 +22,3 @@ # babel-plugin-transform-remove-console

```sh
npm install babel-plugin-transform-remove-console
npm install babel-plugin-transform-remove-console --save-dev
```

@@ -25,0 +25,0 @@

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