Add comments documenting what stuff does

This commit is contained in:
Talia 2021-06-23 16:21:33 +02:00
parent 578e965c90
commit 9f78a9bf14
Signed by: darkwiiplayer
GPG key ID: 7808674088232B3E

View file

@ -1,3 +1,15 @@
/*
A functional HTML generation library.
Example:
html.label(
html.span("Delete everything", {class: ["warning", "important"]}),
html.button("Click", {onClick: e => document.body.innerHTML=""}),
)
or
html.ul([1, 2, 3, 4, 5].map(x => html.li(x)), {class: "numbers"})
*/
const parseAttribute = (attribute) => {
if (typeof attribute == "string" || typeof attribute == "number")
return attribute