@jdeighan/coffee-utils 5.0.5 → 6.0.0
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.
- package/package.json +1 -1
- package/src/log_utils.coffee +4 -3
- package/src/log_utils.js +4 -3
package/package.json
CHANGED
package/src/log_utils.coffee
CHANGED
@@ -17,14 +17,15 @@ export id = 42
|
|
17
17
|
# ---------------------------------------------------------------------------
|
18
18
|
# This is useful for debugging and easy to remove after debugging
|
19
19
|
|
20
|
-
export LOG = (
|
20
|
+
export LOG = (label, item, ch='=') ->
|
21
21
|
|
22
|
-
if
|
22
|
+
if item
|
23
23
|
console.log ch.repeat(42)
|
24
24
|
console.log "[#{label}]:"
|
25
25
|
console.log untabify(orderedStringify(item))
|
26
|
+
console.log ch.repeat(42)
|
26
27
|
else
|
27
|
-
console.log
|
28
|
+
console.log label
|
28
29
|
return
|
29
30
|
|
30
31
|
# ---------------------------------------------------------------------------
|
package/src/log_utils.js
CHANGED
@@ -35,13 +35,14 @@ export var id = 42;
|
|
35
35
|
|
36
36
|
// ---------------------------------------------------------------------------
|
37
37
|
// This is useful for debugging and easy to remove after debugging
|
38
|
-
export var LOG = function(
|
39
|
-
if (
|
38
|
+
export var LOG = function(label, item, ch = '=') {
|
39
|
+
if (item) {
|
40
40
|
console.log(ch.repeat(42));
|
41
41
|
console.log(`[${label}]:`);
|
42
42
|
console.log(untabify(orderedStringify(item)));
|
43
|
+
console.log(ch.repeat(42));
|
43
44
|
} else {
|
44
|
-
console.log(
|
45
|
+
console.log(label);
|
45
46
|
}
|
46
47
|
};
|
47
48
|
|