console-pro-trace
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "console-pro-trace", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "tarce your function. calc the case time.", | ||
@@ -5,0 +5,0 @@ "types": "dist/src/index.d.ts", |
@@ -11,3 +11,3 @@ # console trace | ||
// test/demo1.ts | ||
import { console, registerClassDebug } from '../src/'; | ||
import { console, registerClassDebug, IS_IN_TRACE_MODE } from '../src/'; | ||
class A { | ||
@@ -14,0 +14,0 @@ async say(word) { |
@@ -15,2 +15,3 @@ | ||
}); | ||
export const IS_IN_TRACE_MODE = !!_CONSOLE_PRO_TRACE; | ||
@@ -20,6 +21,3 @@ const AsyncFuncton = (async () => { }).constructor; | ||
const process_base_name = require.main ? path.parse(require.main.filename).base : "" | ||
const process_name = (process['name'] || process.env.name) | ||
|| cluster.isWorker | ||
? `CLUSTER-${process_base_name}-${process.pid}` | ||
: ""; | ||
const process_name = process['name'] || process.env.name || ""; | ||
@@ -26,0 +24,0 @@ const minmatch_options = { nocase: true }; |
15477
303