Generate random numbers that are consecutively unique
90
Randomly rotates seat numbers for recurring sessions while ensuring every seat is chosen exactly once per round before any repeat.
for...of iteration consumes the same underlying stream, so values are not repeated or skipped when switching between the two access patterns. @test@generates
export function createSeatAllocator(minSeat: number, maxSeat: number): (() => number) & {
[Symbol.iterator](): Iterator<number>;
};Provides repeat-free random rotation across a bounded integer range before cycling.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-unique-random