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
1 changed files with 12 additions and 0 deletions

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) => { const parseAttribute = (attribute) => {
if (typeof attribute == "string" || typeof attribute == "number") if (typeof attribute == "string" || typeof attribute == "number")
return attribute return attribute