aboutsummaryrefslogtreecommitdiff
path: root/static/lib.js
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-10-26 18:14:42 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2020-10-26 18:14:42 +0100
commitffca898a875caa66156b8525d517b87c9b9f5327 (patch)
treea48f74cc1a497c6b6a8a5edb93411d7399317659 /static/lib.js
parentFields for extra properties update correctly! (diff)
downloadcalp-ffca898a875caa66156b8525d517b87c9b9f5327.tar.gz
calp-ffca898a875caa66156b8525d517b87c9b9f5327.tar.xz
Cleanup and move input_list to own file.
Diffstat (limited to '')
-rw-r--r--static/lib.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/static/lib.js b/static/lib.js
index 46236411..ab279353 100644
--- a/static/lib.js
+++ b/static/lib.js
@@ -12,6 +12,16 @@ HTMLElement.prototype.addEventListener = function (name, proc) {
};
+
+/* list of lists -> list of tuples */
+function zip(...args) {
+ // console.log(args);
+ if (args === []) return [];
+ return [...Array(Math.min(...args.map(x => x.length))).keys()]
+ .map((_, i) => args.map(lst => lst[i]));
+}
+
+
/* ----- Date Extensions ---------------------------- */
/*