init from site

This commit is contained in:
2025-03-07 14:59:06 +01:00
parent ba7ba3a090
commit f3475181ff
2634 changed files with 376169 additions and 54 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;
}