@jdeighan/coffee-utils 10.0.6 → 10.0.7

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": "10.0.6",
4
+ "version": "10.0.7",
5
5
  "description": "A set of utility functions for CoffeeScript",
6
6
  "main": "coffee_utils.js",
7
7
  "exports": {
@@ -99,7 +99,10 @@ export undented = (input, level=undef, oneIndent="\t") ->
99
99
 
100
100
  lLines = toArray(input)
101
101
  if (lLines.length == 0)
102
- return ''
102
+ if isString(input)
103
+ return ''
104
+ else
105
+ return []
103
106
 
104
107
  # --- determine what to remove from beginning of each line
105
108
  if defined(level)
@@ -118,7 +118,11 @@ export var undented = function(input, level = undef, oneIndent = "\t") {
118
118
  }
119
119
  lLines = toArray(input);
120
120
  if (lLines.length === 0) {
121
- return '';
121
+ if (isString(input)) {
122
+ return '';
123
+ } else {
124
+ return [];
125
+ }
122
126
  }
123
127
  // --- determine what to remove from beginning of each line
124
128
  if (defined(level)) {