diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-12-18 23:18:47 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-12-18 23:18:47 +0100 |
commit | 0e1eb02c1a6d596bd1e620b9c9bb13e6c125f5cb (patch) | |
tree | fef88b7581e8e3f2b41f739137ad42859e67915c /static/lib.js | |
parent | Add convert entry-point. (diff) | |
download | calp-0e1eb02c1a6d596bd1e620b9c9bb13e6c125f5cb.tar.gz calp-0e1eb02c1a6d596bd1e620b9c9bb13e6c125f5cb.tar.xz |
Start work on jcal system.
Diffstat (limited to 'static/lib.js')
-rw-r--r-- | static/lib.js | 8 |
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"); |