@jdeighan/coffee-utils 7.0.43 → 7.0.44

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.43",
4
+ "version": "7.0.44",
5
5
  "description": "A set of utility functions for CoffeeScript",
6
6
  "main": "coffee_utils.js",
7
7
  "exports": {
@@ -78,7 +78,7 @@ export undented = (text, level=undef) ->
78
78
  else if isArray(text)
79
79
  lLines = text
80
80
  for line in lLines
81
- assert isString(line), "undented(): input array is not all strings"
81
+ assert isString(line), "undented(): array not all strings"
82
82
  if (lLines.length == 0)
83
83
  return []
84
84
  else
@@ -91,7 +91,7 @@ export undented = (text, level=undef) ->
91
91
  else
92
92
  lMatches = lLines[0].match(/^\s*/)
93
93
  toRemove = lMatches[0]
94
- nToRemove = toRemove.length
94
+ nToRemove = indentLevel(toRemove)
95
95
 
96
96
  lNewLines = []
97
97
  for line in lLines
@@ -99,7 +99,7 @@ export var undented = function(text, level = undef) {
99
99
  lLines = text;
100
100
  for (i = 0, len = lLines.length; i < len; i++) {
101
101
  line = lLines[i];
102
- assert(isString(line), "undented(): input array is not all strings");
102
+ assert(isString(line), "undented(): array not all strings");
103
103
  }
104
104
  if (lLines.length === 0) {
105
105
  return [];
@@ -115,7 +115,7 @@ export var undented = function(text, level = undef) {
115
115
  lMatches = lLines[0].match(/^\s*/);
116
116
  toRemove = lMatches[0];
117
117
  }
118
- nToRemove = toRemove.length;
118
+ nToRemove = indentLevel(toRemove);
119
119
  lNewLines = [];
120
120
  for (j = 0, len1 = lLines.length; j < len1; j++) {
121
121
  line = lLines[j];