boxwood 0.61.2 → 0.61.3
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 +8 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -110,11 +110,14 @@ const ALIASES = {
|
|
|
110
110
|
const attributes = (options) => {
|
|
111
111
|
const result = []
|
|
112
112
|
for (const key in options) {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
113
|
+
const value = options[key]
|
|
114
|
+
if (value) {
|
|
115
|
+
if (BOOLEAN_ATTRIBUTES.includes(key)) {
|
|
116
|
+
result.push(key)
|
|
117
|
+
} else {
|
|
118
|
+
const name = ALIASES[key] || key
|
|
119
|
+
result.push(name + '=' + '"' + options[key] + '"')
|
|
120
|
+
}
|
|
118
121
|
}
|
|
119
122
|
}
|
|
120
123
|
return result.join(' ')
|