pareto-core-dev 0.11.2 → 0.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* logs a debug message
|
|
3
|
+
* this function should only be called from code that is in the development phase,
|
|
4
|
+
* before publishing, the usages should be removed
|
|
5
|
+
* @param message the string to be printed to stdout
|
|
6
|
+
*/
|
|
7
|
+
export declare function log_wrapping_debug_messages<T>(message: string, handler: () => T, after: string): T;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.log_wrapping_debug_messages = log_wrapping_debug_messages;
|
|
4
|
+
/**
|
|
5
|
+
* logs a debug message
|
|
6
|
+
* this function should only be called from code that is in the development phase,
|
|
7
|
+
* before publishing, the usages should be removed
|
|
8
|
+
* @param message the string to be printed to stdout
|
|
9
|
+
*/
|
|
10
|
+
function log_wrapping_debug_messages(message, handler, after) {
|
|
11
|
+
console.log("DEBUG BEFORE", message);
|
|
12
|
+
const startTime = Date.now();
|
|
13
|
+
const x = handler();
|
|
14
|
+
const duration = Date.now() - startTime;
|
|
15
|
+
console.log("DEBUG AFTER", message, `(${duration}ms)`);
|
|
16
|
+
return x;
|
|
17
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pareto-core-dev",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.3",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"description": "a pareto package that contains functions that are useful during development",
|
|
6
6
|
"author": "Corno",
|
|
@@ -24,6 +24,6 @@
|
|
|
24
24
|
"url": "git+https://github.com/corno/pareto-core-dev.git"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"pareto-core-internals": "^0.24.
|
|
27
|
+
"pareto-core-internals": "^0.24.34"
|
|
28
28
|
}
|
|
29
29
|
}
|