aboutsummaryrefslogtreecommitdiff
path: root/static/lib.js
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-12-18 23:18:47 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2020-12-18 23:18:47 +0100
commit0e1eb02c1a6d596bd1e620b9c9bb13e6c125f5cb (patch)
treefef88b7581e8e3f2b41f739137ad42859e67915c /static/lib.js
parentAdd convert entry-point. (diff)
downloadcalp-0e1eb02c1a6d596bd1e620b9c9bb13e6c125f5cb.tar.gz
calp-0e1eb02c1a6d596bd1e620b9c9bb13e6c125f5cb.tar.xz
Start work on jcal system.
Diffstat (limited to '')
-rw-r--r--static/lib.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/static/lib.js b/static/lib.js
index ab279353..84ca97c8 100644
--- a/static/lib.js
+++ b/static/lib.js
@@ -117,6 +117,14 @@ function setVar(str, val) {
}
+function asList(thing) {
+ if (thing instanceof Array) {
+ return thing;
+ } else {
+ return [thing];
+ }
+}
+
function datepad(thing, width=2) {
return (thing + "").padStart(width, "0");