boxwood 0.71.0 → 0.71.2
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/index.js +5 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -171,7 +171,10 @@ const render = (input, escape = true) => {
|
|
|
171
171
|
return ""
|
|
172
172
|
}
|
|
173
173
|
if (Array.isArray(input)) {
|
|
174
|
-
return input
|
|
174
|
+
return input
|
|
175
|
+
.filter(Boolean)
|
|
176
|
+
.map((input) => render(input))
|
|
177
|
+
.join("")
|
|
175
178
|
}
|
|
176
179
|
if (typeof input === "number") {
|
|
177
180
|
return input.toString()
|
|
@@ -455,7 +458,7 @@ const yaml = {
|
|
|
455
458
|
load() {
|
|
456
459
|
const path = join(...arguments)
|
|
457
460
|
const file = path.endsWith(".yaml") ? path : join(path, "index.yaml")
|
|
458
|
-
const content = readFileSync(
|
|
461
|
+
const content = readFileSync(file, "utf8")
|
|
459
462
|
return YAML.parse(content)
|
|
460
463
|
},
|
|
461
464
|
}
|