Comparing version 0.0.18 to 0.0.19
@@ -104,3 +104,3 @@ /// <reference types="node" /> | ||
} | ||
export { Debug as debug }; | ||
export { Debug as debug, Debugger as IDebugger }; | ||
export default Debug; |
@@ -47,3 +47,2 @@ "use strict"; | ||
if (!label) { | ||
Debug.times[hrt.join(':')] = hrt; | ||
return hrt; | ||
@@ -60,4 +59,12 @@ } | ||
const first = args.shift(); | ||
const label = Array.isArray(first) ? first.join(':') : first || 'default'; | ||
const start = Debug.times[label]; | ||
let label; | ||
let start; | ||
if (Array.isArray(first) && first.length === 2 && Number.isFinite(first[0]) && Number.isFinite(first[1])) { | ||
label = first.join(':'); | ||
start = first; | ||
} | ||
else { | ||
label = first && String(first) || 'default'; | ||
start = Debug.times[label]; | ||
} | ||
if (!start) | ||
@@ -127,3 +134,3 @@ Debug.log(`Warning: No such label '${label}' for Debug.timeEnd()`); | ||
Debug.instances.push(debug); | ||
return debug; | ||
return debug.log; | ||
} | ||
@@ -130,0 +137,0 @@ exports.Debug = Debug; |
@@ -172,3 +172,3 @@ "use strict"; | ||
try { | ||
json = require(path); | ||
json = (module || global)['require'](path); | ||
} | ||
@@ -175,0 +175,0 @@ catch (e) { |
{ | ||
"name": "exer", | ||
"version": "0.0.18", | ||
"version": "0.0.19", | ||
"description": "Utils in TypeScript, Debug, NanoTimer ...", | ||
@@ -32,3 +32,3 @@ "author": "kbajalc@gmail.com", | ||
"clean": "rm -rf lib", | ||
"build": "rm -rf lib ; tsc -p .", | ||
"build": "rm -rf lib ; tsc -p . ; tslint -p .", | ||
"watch": "rm -rf lib ; tsc -p . --watch", | ||
@@ -50,4 +50,4 @@ "release": "npm run build && npm version patch && git push --follow-tags && npm publish", | ||
"tty": "^1.0.1", | ||
"typescript": "^3.4.3" | ||
"typescript": "^3.4.4" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
112156
1717
6