@jdeighan/coffee-utils 7.0.70 → 7.0.73

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.70",
4
+ "version": "7.0.73",
5
5
  "description": "A set of utility functions for CoffeeScript",
6
6
  "main": "coffee_utils.js",
7
7
  "exports": {
@@ -4,7 +4,7 @@ import fs from 'fs'
4
4
  import readline from 'readline'
5
5
 
6
6
  import {
7
- assert, isEmpty, isString, nonEmpty, error, rtrim,
7
+ assert, defined, isEmpty, isString, nonEmpty, error, rtrim,
8
8
  } from '@jdeighan/coffee-utils'
9
9
 
10
10
  # ---------------------------------------------------------------------------
@@ -29,6 +29,7 @@ export blockToArray = (block) ->
29
29
 
30
30
  export arrayToBlock = (lLines) ->
31
31
 
32
+ lLines = lLines.filter((line) => defined(line));
32
33
  if lLines.length == 0
33
34
  return ''
34
35
  else
@@ -6,6 +6,7 @@ import readline from 'readline';
6
6
 
7
7
  import {
8
8
  assert,
9
+ defined,
9
10
  isEmpty,
10
11
  isString,
11
12
  nonEmpty,
@@ -34,6 +35,9 @@ export var blockToArray = function(block) {
34
35
  // ---------------------------------------------------------------------------
35
36
  // arrayToBlock - block will have no trailing whitespace
36
37
  export var arrayToBlock = function(lLines) {
38
+ lLines = lLines.filter((line) => {
39
+ return defined(line);
40
+ });
37
41
  if (lLines.length === 0) {
38
42
  return '';
39
43
  } else {