Comparing version 0.0.9 to 0.0.10
@@ -16,5 +16,2 @@ "use strict"; | ||
namespace = namespace || 'debug'; | ||
if (enable) | ||
Debug.enable(namespace); | ||
let prevTime; | ||
function debug(...args) { | ||
@@ -28,7 +25,7 @@ // Disabled? | ||
const curr = Debug.now(); | ||
const ms = Debug.millis(prevTime || curr); | ||
const ms = Debug.millis(debug.prev || curr); | ||
self.diff = ms; | ||
self.prev = prevTime; | ||
self.prev = debug.prev; | ||
self.curr = curr; | ||
prevTime = curr; | ||
debug.prev = curr; | ||
let timer = ''; | ||
@@ -83,4 +80,5 @@ if (this && this.name === Debug.time.name) { | ||
} | ||
debug.prev = process.hrtime(); | ||
debug.namespace = namespace; | ||
debug.enabled = Debug.enabled(namespace); | ||
debug.enabled = Debug.enabled(namespace) || enable; | ||
debug.useColors = Debug.useColors(); | ||
@@ -87,0 +85,0 @@ debug.color = Debug.selectColor(namespace); |
{ | ||
"name": "exer", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"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
66372
949