aboutsummaryrefslogtreecommitdiffziptar.gz
path: root/viewer/js/latest.js
diff options
context:
space:
mode:
authorgodosa <godosa@godosa.eu>2026-10-07 00:14:38 +0200
committergodosa <godosa@godosa.eu>2026-10-07 00:14:38 +0200
commit3443c1c65e9f1753e1e656b35d08416c1fa298f2 (patch)
tree4e43236f460145a4d75d1b4616dcb7aa6ef08f51 /viewer/js/latest.js
downloadworldmap-viewer-3443c1c65e9f1753e1e656b35d08416c1fa298f2.tar.gz
worldmap-viewer-3443c1c65e9f1753e1e656b35d08416c1fa298f2.zip
worldmap-viewer: initial public history
Diffstat (limited to 'viewer/js/latest.js')
-rw-r--r--viewer/js/latest.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/viewer/js/latest.js b/viewer/js/latest.js
new file mode 100644
index 0000000..d20b5d5
--- /dev/null
+++ b/viewer/js/latest.js
@@ -0,0 +1,6 @@
+// latest.js — overlapping async calls: only the newest one's answer is applied.
+export class Latest {
+ n = 0;
+ next() { return ++this.n; }
+ is(k) { return k === this.n; }
+}