diff options
Diffstat (limited to '')
-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"); |