@jdeighan/coffee-utils 11.0.29 → 11.0.31
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/fs.coffee +3 -1
- package/src/fs.js +3 -0
- package/src/utils.coffee +1 -1
- package/src/utils.js +1 -0
package/package.json
CHANGED
package/src/fs.coffee
CHANGED
@@ -5,7 +5,7 @@ import urllib from 'url'
|
|
5
5
|
import fs from 'fs'
|
6
6
|
import NReadLines from 'n-readlines'
|
7
7
|
|
8
|
-
import {assert, croak, LOG, fromTAML} from '@jdeighan/exceptions'
|
8
|
+
import {assert, croak, debug, LOG, fromTAML} from '@jdeighan/exceptions'
|
9
9
|
import {
|
10
10
|
undef, pass, defined, rtrim, isEmpty, nonEmpty, getOptions,
|
11
11
|
isString, isArray, isHash, isRegExp, isFunction, OL,
|
@@ -377,6 +377,7 @@ export parseSource = (source) ->
|
|
377
377
|
# }
|
378
378
|
# --- NOTE: source may be a file URL, e.g. import.meta.url
|
379
379
|
|
380
|
+
debug "enter parseSource(#{OL(source)})"
|
380
381
|
assert isString(source),\
|
381
382
|
"parseSource(): source not a string: #{OL(source)}"
|
382
383
|
if source == 'unit test'
|
@@ -413,6 +414,7 @@ export parseSource = (source) ->
|
|
413
414
|
([A-Za-z_]+)
|
414
415
|
$///)
|
415
416
|
hSourceInfo.purpose = lMatches[1]
|
417
|
+
debug "return from parseSource()", hSourceInfo
|
416
418
|
return hSourceInfo
|
417
419
|
|
418
420
|
# ---------------------------------------------------------------------------
|
package/src/fs.js
CHANGED
@@ -13,6 +13,7 @@ import NReadLines from 'n-readlines';
|
|
13
13
|
import {
|
14
14
|
assert,
|
15
15
|
croak,
|
16
|
+
debug,
|
16
17
|
LOG,
|
17
18
|
fromTAML
|
18
19
|
} from '@jdeighan/exceptions';
|
@@ -446,6 +447,7 @@ export var parseSource = function(source) {
|
|
446
447
|
// purpose
|
447
448
|
// }
|
448
449
|
// --- NOTE: source may be a file URL, e.g. import.meta.url
|
450
|
+
debug(`enter parseSource(${OL(source)})`);
|
449
451
|
assert(isString(source), `parseSource(): source not a string: ${OL(source)}`);
|
450
452
|
if (source === 'unit test') {
|
451
453
|
croak("A source of 'unit test' is deprecated");
|
@@ -481,6 +483,7 @@ export var parseSource = function(source) {
|
|
481
483
|
hSourceInfo.purpose = lMatches[1];
|
482
484
|
}
|
483
485
|
}
|
486
|
+
debug("return from parseSource()", hSourceInfo);
|
484
487
|
return hSourceInfo;
|
485
488
|
};
|
486
489
|
|
package/src/utils.coffee
CHANGED
@@ -12,7 +12,7 @@ import {
|
|
12
12
|
} from '@jdeighan/exceptions/utils'
|
13
13
|
|
14
14
|
export {
|
15
|
-
undef, pass, defined, notdefined, sep_dash, sep_eq,
|
15
|
+
undef, pass, defined, notdefined, LOG, sep_dash, sep_eq,
|
16
16
|
deepCopy, escapeStr, unescapeStr, hasChar, quoted, OL,
|
17
17
|
isString, isNumber, isInteger, isHash, isArray, isBoolean,
|
18
18
|
isConstructor, isFunction, isRegExp, isObject, getClassName,
|