5etools-utils 0.1.20 → 0.1.21

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.
Files changed (2) hide show
  1. package/lib/UtilFs.js +2 -1
  2. package/package.json +1 -1
package/lib/UtilFs.js CHANGED
@@ -38,7 +38,8 @@ function readJSON (path, {isIncludeRaw = false} = {}) {
38
38
  function listJsonFiles (dir, opts, state) {
39
39
  const {dirBlacklist = null} = opts || {};
40
40
  state = state || {};
41
- state.dirBlacklist = state.dirBlacklist ? new Set([...dirBlacklist].map(it => path.normalize(it))) : new Set();
41
+ state.dirBlacklist = state.dirBlacklist
42
+ || (dirBlacklist ? new Set([...dirBlacklist].map(it => path.normalize(it))) : new Set());
42
43
 
43
44
  const dirContent = fs.readdirSync(dir, "utf8")
44
45
  .map(file => dir === "." ? file : `${dir}/${file}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "5etools-utils",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "description": "Shared utilities for the 5etools ecosystem.",
5
5
  "type": "module",
6
6
  "main": "lib/Api.js",