Initial commit

This commit is contained in:
PolyCraft
2025-03-08 21:04:49 +01:00
commit cfc89e75ab
800 changed files with 109042 additions and 0 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;
}