From 3443c1c65e9f1753e1e656b35d08416c1fa298f2 Mon Sep 17 00:00:00 2001 From: godosa Date: Wed, 7 Oct 2026 00:14:38 +0200 Subject: worldmap-viewer: initial public history --- viewer/js/latest.js | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 viewer/js/latest.js (limited to 'viewer/js/latest.js') 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; } +} -- cgit