This commit is contained in:
babayaga
2025-08-26 12:17:29 +02:00
parent 2778a63383
commit 8998614cba
501 changed files with 34067 additions and 3511 deletions
@@ -0,0 +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;
}