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

@josecarlosrz/logger

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@josecarlosrz/logger - npm Package Compare versions

Comparing version 1.0.22 to 1.0.23

test.js

79

index.js

@@ -11,5 +11,7 @@ const nodeConsole = require('console');

const LoggerChecker = {
class LoggerChecker
{
isLoggerDisabled: function() {
static isLoggerDisabled()
{

@@ -21,5 +23,6 @@ return (

},
}
isSleepDisabled: function() {
static isSleepDisabled()
{

@@ -31,5 +34,6 @@ return (

},
}
isDev: function() {
static isDev()
{

@@ -41,9 +45,11 @@ return (

},
}
};
}
const TmpLogger = {
class TmpLogger
{
logger: function(message, ...args) {
static log(message, ...args)
{

@@ -84,5 +90,6 @@ const stack = stackTrace.get();

},
}
sleep: function(seconds) {
static sleep(seconds)
{

@@ -93,16 +100,19 @@ return new Promise((resolve, reject) => {

},
}
};
}
const Logger = {
class Logger
{
logger: function(message, ...args) {
static log(message, ...args)
{
if (!Logger.isLoggerDisabled())
TmpLogger.logger(message, ...args);
TmpLogger.log(message, ...args);
},
}
sleep: async function(seconds) {
static async sleep(seconds)
{

@@ -112,12 +122,14 @@ if (!Logger.isSleepDisabled())

},
}
devLogger: function(message, ...args) {
static devLog(message, ...args)
{
if (!Logger.isLoggerDisabled() && Logger.isDev())
TmpLogger.logger(message, ...args);
TmpLogger.log(message, ...args);
},
}
devSleep: async function(seconds) {
static async devSleep(seconds)
{

@@ -127,18 +139,21 @@ if (!Logger.isSleepDisabled() && Logger.isDev())

},
}
isLoggerDisabled: function() {
static isLoggerDisabled()
{
return LoggerChecker.isLoggerDisabled();
},
}
isSleepDisabled: function() {
static isSleepDisabled()
{
return LoggerChecker.isSleepDisabled();
},
}
isDev: function() {
static isDev()
{
return LoggerChecker.isDev();
},
}
};
}
module.exports = Logger;
{
"name": "@josecarlosrz/logger",
"version": "1.0.22",
"version": "1.0.23",
"description": "Function to log each component of our application",

@@ -5,0 +5,0 @@ "main": "index.js",

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