Comparing version 0.0.31 to 0.0.32
@@ -98,5 +98,7 @@ /// <reference types="node" /> | ||
var alertIcon: string; | ||
var fatalIcon: string; | ||
var criticalIcon: string; | ||
var errorIcon: string; | ||
var infoIcon: string; | ||
var warnIcon: string; | ||
var warningIcon: string; | ||
@@ -107,4 +109,2 @@ var noticeIcon: string; | ||
var timeIcon: string; | ||
var endIcon: string; | ||
var timeEndIcon: string; | ||
var log: (...args: any[]) => void; | ||
@@ -111,0 +111,0 @@ var emerg: (...args: any[]) => void; |
@@ -175,11 +175,2 @@ "use strict"; | ||
break; | ||
case 'fatal': | ||
z = 'alert'; | ||
break; | ||
case 'warn': | ||
z = 'warning'; | ||
break; | ||
case 'time': | ||
z = 'time'; | ||
break; | ||
case 'timeEnd': | ||
@@ -203,3 +194,3 @@ z = 'time'; | ||
} | ||
if (level) | ||
if (level && !Debug.inspectOpts.systemd) | ||
level += ' '; | ||
@@ -214,4 +205,6 @@ const name = `[${this.namespace}]`; | ||
let line = util.format.call(util, ...args); | ||
// TODO Escape new lines | ||
line = line.split('\n').join('\n' + level + date + name + ' '); | ||
// line = line.split('\n').join('\n' + level + date + name + ' '); | ||
// Escape new lines | ||
line = JSON.stringify(line); | ||
line = line.substring(1, line.length - 1); | ||
args[0] = line; | ||
@@ -226,6 +219,2 @@ args.length = 1; | ||
args.push(colorCode + 'm+' + Debug.humanize(this.diff) + "\x1B[0m"); | ||
let line = util.format.call(util, ...args); | ||
line = line.split('\n').join('\n' + level + prefix); | ||
args[0] = line; | ||
args.length = 1; | ||
} | ||
@@ -236,13 +225,5 @@ else { | ||
args.push('+' + Debug.humanize(this.diff)); | ||
let line = util.format.call(util, ...args); | ||
// TODO Escape new lines | ||
line = line.split('\n').join('\n' + date + level + name + ' '); | ||
args[0] = line; | ||
args.length = 1; | ||
} | ||
// return util.format.call(util, ...args); | ||
}; | ||
// Debug.debug = Debug; | ||
// Debug.default = Debug; | ||
// Debug.humanize = require('ms'); | ||
Debug.humanize = (ms) => `${ms} ms`; | ||
@@ -488,5 +469,7 @@ Debug.times = {}; | ||
Debug.alertIcon = 'đ'; | ||
Debug.fatalIcon = 'đ'; | ||
Debug.criticalIcon = 'đ'; | ||
Debug.errorIcon = 'â'; | ||
Debug.infoIcon = 'âšī¸'; | ||
Debug.warnIcon = 'â ī¸'; | ||
Debug.warningIcon = 'â ī¸'; | ||
@@ -497,4 +480,2 @@ Debug.noticeIcon = 'â ī¸'; | ||
Debug.timeIcon = 'âąī¸'; | ||
Debug.endIcon = 'âąī¸'; | ||
Debug.timeEndIcon = 'âąī¸'; | ||
/** | ||
@@ -501,0 +482,0 @@ * Invokes `util.format()` with the specified arguments and writes to stderr. |
{ | ||
"name": "exer", | ||
"version": "0.0.31", | ||
"version": "0.0.32", | ||
"description": "Utils in TypeScript, Debug, NanoTimer ...", | ||
@@ -5,0 +5,0 @@ "author": "kbajalc@gmail.com", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
184623
2497