Generate random numbers that are consecutively unique
90
A module that cycles through provided items in random order without immediate repeats, even when a cycle resets.
@generates
export type ItemEmitter = (() => string) & Iterable<string>;
/**
* Creates a stateful emitter over the provided items.
* @param {readonly string[]} items Non-empty list of identifiers to rotate through.
* @returns {ItemEmitter} Infinite sequence honoring randomized, non-repeating cycles.
*/
export function createItemEmitter(items: readonly string[]): ItemEmitter;Provides exhaustive random sequencing over an integer range without repeating the last emitted value across cycle resets. @satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-unique-random