@jdeighan/coffee-utils 7.0.12 → 7.0.13
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 +10 -6
- package/src/log_utils.js +10 -6
package/package.json
CHANGED
package/src/log_utils.coffee
CHANGED
@@ -21,13 +21,17 @@ export LOG = (lArgs...) ->
|
|
21
21
|
|
22
22
|
[label, item] = lArgs
|
23
23
|
if lArgs.length > 1
|
24
|
-
|
25
|
-
if item?
|
26
|
-
console.log "#{label}:"
|
27
|
-
console.log untabify(orderedStringify(item))
|
28
|
-
else
|
24
|
+
# --- There's both a label and an item
|
25
|
+
if ! item?
|
29
26
|
console.log "#{label}: UNDEFINED"
|
30
|
-
|
27
|
+
else
|
28
|
+
console.log sep_dash
|
29
|
+
console.log "#{label}:"
|
30
|
+
if isString(item)
|
31
|
+
console.log item
|
32
|
+
else
|
33
|
+
console.log untabify(orderedStringify(item))
|
34
|
+
console.log sep_dash
|
31
35
|
else
|
32
36
|
console.log label
|
33
37
|
return
|
package/src/log_utils.js
CHANGED
@@ -39,14 +39,18 @@ export var LOG = function(...lArgs) {
|
|
39
39
|
var item, label;
|
40
40
|
[label, item] = lArgs;
|
41
41
|
if (lArgs.length > 1) {
|
42
|
-
|
43
|
-
if (item != null) {
|
44
|
-
console.log(`${label}:`);
|
45
|
-
console.log(untabify(orderedStringify(item)));
|
46
|
-
} else {
|
42
|
+
if (item == null) {
|
47
43
|
console.log(`${label}: UNDEFINED`);
|
44
|
+
} else {
|
45
|
+
console.log(sep_dash);
|
46
|
+
console.log(`${label}:`);
|
47
|
+
if (isString(item)) {
|
48
|
+
console.log(item);
|
49
|
+
} else {
|
50
|
+
console.log(untabify(orderedStringify(item)));
|
51
|
+
}
|
52
|
+
console.log(sep_dash);
|
48
53
|
}
|
49
|
-
console.log(sep_dash);
|
50
54
|
} else {
|
51
55
|
console.log(label);
|
52
56
|
}
|