@jdeighan/coffee-utils 7.0.36 → 7.0.37

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jdeighan/coffee-utils",
3
3
  "type": "module",
4
- "version": "7.0.36",
4
+ "version": "7.0.37",
5
5
  "description": "A set of utility functions for CoffeeScript",
6
6
  "main": "coffee_utils.js",
7
7
  "exports": {
@@ -13,8 +13,8 @@ import {arrayToBlock, blockToArray} from '@jdeighan/coffee-utils/block'
13
13
 
14
14
  export splitLine = (line) ->
15
15
 
16
- assert line?, "splitLine(): line is undef"
17
- assert isString(line), "splitLine(): line is not a string"
16
+ assert defined(line), "splitLine(): line is undef"
17
+ assert isString(line), "splitLine(): non-string #{OL(line)}"
18
18
  line = rtrim(line)
19
19
  lMatches = line.match(/^(\s*)(.*)$/)
20
20
  return [lMatches[1].length, lMatches[2]]
@@ -25,8 +25,8 @@ import {
25
25
  // splitLine - separate a line into [level, line]
26
26
  export var splitLine = function(line) {
27
27
  var lMatches;
28
- assert(line != null, "splitLine(): line is undef");
29
- assert(isString(line), "splitLine(): line is not a string");
28
+ assert(defined(line), "splitLine(): line is undef");
29
+ assert(isString(line), `splitLine(): non-string ${OL(line)}`);
30
30
  line = rtrim(line);
31
31
  lMatches = line.match(/^(\s*)(.*)$/);
32
32
  return [lMatches[1].length, lMatches[2]];