Socket
Socket
Sign inDemoInstall

resolve-debug-levels

Package Overview
Dependencies
Maintainers
3
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resolve-debug-levels - npm Package Compare versions

Comparing version 0.22.15 to 0.23.0

6

es/index.js
import debug from 'debug';
var logLevels = ['log', 'error', 'warn', 'debug', 'info', 'verbose'];
var defaultLogLevel = logLevels[2];
var emptyFunction = Function(); // eslint-disable-line no-new-func
var debugLevels = function debugLevels(debugProvider, envProvider, namespace) {
var logLevel = 'warn';
var logLevel = defaultLogLevel;

@@ -13,3 +14,4 @@ if (envProvider.hasOwnProperty('DEBUG_LEVEL')) {

if (logLevels.indexOf(logLevel) < 0) {
throw new Error("Log level " + logLevel + " is not found in allowed levels");
debugProvider(namespace)("Attempted to set unsupported DEBUG_LEVEL=\"" + logLevel + "\", so fallback to default level \"" + defaultLogLevel + "\"");
logLevel = defaultLogLevel;
}

@@ -16,0 +18,0 @@

@@ -11,6 +11,7 @@ "use strict";

var logLevels = ['log', 'error', 'warn', 'debug', 'info', 'verbose'];
var defaultLogLevel = logLevels[2];
var emptyFunction = Function(); // eslint-disable-line no-new-func
var debugLevels = function debugLevels(debugProvider, envProvider, namespace) {
var logLevel = 'warn';
var logLevel = defaultLogLevel;

@@ -22,3 +23,4 @@ if (envProvider.hasOwnProperty('DEBUG_LEVEL')) {

if (logLevels.indexOf(logLevel) < 0) {
throw new Error("Log level " + logLevel + " is not found in allowed levels");
debugProvider(namespace)("Attempted to set unsupported DEBUG_LEVEL=\"" + logLevel + "\", so fallback to default level \"" + defaultLogLevel + "\"");
logLevel = defaultLogLevel;
}

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

{
"name": "resolve-debug-levels",
"version": "0.22.15",
"version": "0.23.0",
"description": "Provides the debug-level API for reSolve packages.",

@@ -32,3 +32,3 @@ "engines": {

"devDependencies": {
"jest": "24.1.0",
"jest": "25.1.0",
"sinon": "7.2.2",

@@ -35,0 +35,0 @@ "uuid": "3.3.2"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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