typescript-logging-category-style
Advanced tools
Comparing version
@@ -527,3 +527,6 @@ /** | ||
this._globalRuntimeSettings = { | ||
/* It's unclear, but not checking explicitly on undefined here makes the test fail, it makes no sense as level is a number | undefined essentially. */ | ||
/* | ||
* Undefined check is necessary, as level is a number (and LogLevel.Trace = 0), a ternary check otherwise results in the annoying "truthy/falsy" | ||
* behavior of javascript where 0 is seen as false. | ||
*/ | ||
level: settings.level !== undefined ? settings.level : this._globalRuntimeSettings.level, | ||
@@ -566,3 +569,6 @@ channel: settings.channel !== undefined ? settings.channel : this._globalRuntimeSettings.channel, | ||
return Object.assign(Object.assign({}, currentSettings), { | ||
/* It's unclear, but not checking explicitly on undefined here makes the test fail, it makes no sense as level is a number | undefined essentially. */ | ||
/* | ||
* Undefined check is necessary, as level is a number (and LogLevel.Trace = 0), a ternary check otherwise results in the annoying "truthy/falsy" | ||
* behavior of javascript where 0 is seen as false. | ||
*/ | ||
level: settings.level !== undefined ? settings.level : currentSettings.level, channel: settings.channel !== undefined ? settings.channel : currentSettings.channel }); | ||
@@ -1156,3 +1162,3 @@ } | ||
allowSameCategoryName: config.allowSameCategoryName !== undefined ? config.allowSameCategoryName : defaultConfig.allowSameCategoryName, | ||
level: config.level ? config.level : defaultConfig.level, | ||
level: config.level !== undefined ? config.level : defaultConfig.level, | ||
dateFormatter: config.dateFormatter ? config.dateFormatter : defaultConfig.dateFormatter, | ||
@@ -1159,0 +1165,0 @@ argumentFormatter: config.argumentFormatter ? config.argumentFormatter : defaultConfig.argumentFormatter, |
@@ -531,3 +531,6 @@ 'use strict'; | ||
this._globalRuntimeSettings = { | ||
/* It's unclear, but not checking explicitly on undefined here makes the test fail, it makes no sense as level is a number | undefined essentially. */ | ||
/* | ||
* Undefined check is necessary, as level is a number (and LogLevel.Trace = 0), a ternary check otherwise results in the annoying "truthy/falsy" | ||
* behavior of javascript where 0 is seen as false. | ||
*/ | ||
level: settings.level !== undefined ? settings.level : this._globalRuntimeSettings.level, | ||
@@ -570,3 +573,6 @@ channel: settings.channel !== undefined ? settings.channel : this._globalRuntimeSettings.channel, | ||
return Object.assign(Object.assign({}, currentSettings), { | ||
/* It's unclear, but not checking explicitly on undefined here makes the test fail, it makes no sense as level is a number | undefined essentially. */ | ||
/* | ||
* Undefined check is necessary, as level is a number (and LogLevel.Trace = 0), a ternary check otherwise results in the annoying "truthy/falsy" | ||
* behavior of javascript where 0 is seen as false. | ||
*/ | ||
level: settings.level !== undefined ? settings.level : currentSettings.level, channel: settings.channel !== undefined ? settings.channel : currentSettings.channel }); | ||
@@ -1160,3 +1166,3 @@ } | ||
allowSameCategoryName: config.allowSameCategoryName !== undefined ? config.allowSameCategoryName : defaultConfig.allowSameCategoryName, | ||
level: config.level ? config.level : defaultConfig.level, | ||
level: config.level !== undefined ? config.level : defaultConfig.level, | ||
dateFormatter: config.dateFormatter ? config.dateFormatter : defaultConfig.dateFormatter, | ||
@@ -1163,0 +1169,0 @@ argumentFormatter: config.argumentFormatter ? config.argumentFormatter : defaultConfig.argumentFormatter, |
{ | ||
"name": "typescript-logging-category-style", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "TypeScript Logging category style written in and to be used by TypeScript.", | ||
@@ -47,3 +47,3 @@ "main": "dist/bundle/typescript-logging-category.js", | ||
"peerDependencies": { | ||
"typescript-logging": "~2.0.1" | ||
"typescript-logging": "~2.0.2" | ||
}, | ||
@@ -50,0 +50,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
359057
0.25%2684
0.45%