From 9f78a9bf1485cc4d1f6fbc536053c0d901e4291b Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Wed, 23 Jun 2021 16:21:33 +0200 Subject: [PATCH] Add comments documenting what stuff does --- skooma.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/skooma.js b/skooma.js index 81332bb..ce3c77d 100644 --- a/skooma.js +++ b/skooma.js @@ -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