worldmap-viewer

git clone https://git.godosa.eu/worldmap-viewer

master

raw · 179 bytes

1
2
3
4
5
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; }
}