Synced from site

This commit is contained in:
2025-03-12 18:53:16 +01:00
parent 3e13363c6c
commit 6541d83fba
301 changed files with 31858 additions and 30212 deletions
@@ -1,27 +1,27 @@
// @ts-check
import printWarning from "../../utils/printWarning.js";
export default function getAttributesString({
attributes,
element = "",
excludeArray = [],
}) {
const attributesString = Object.keys(attributes)
.filter((key) => {
if (excludeArray.includes(key)) {
printWarning({
key,
element,
});
return false;
}
return true;
})
.map((key) => `${key}="${attributes[key]}"`)
.join(" ");
return attributesString;
}
// @ts-check
import printWarning from "../../utils/printWarning.js";
export default function getAttributesString({
attributes,
element = "",
excludeArray = [],
}) {
const attributesString = Object.keys(attributes)
.filter((key) => {
if (excludeArray.includes(key)) {
printWarning({
key,
element,
});
return false;
}
return true;
})
.map((key) => `${key}="${attributes[key]}"`)
.join(" ");
return attributesString;
}