Generate random numbers that are consecutively unique
90
A callable-and-iterable numeric source built around inclusive bounds, emphasizing the equal-bounds case.
for...of when minimum and maximum match yields the same bound value on every step. @test@generates
export type NumberSource = (() => number) & { [Symbol.iterator](): Iterator<number> };
/**
* Returns a callable + iterable numeric source emitting pseudo-random integers within inclusive bounds.
* When minimum equals maximum, it must emit that exact value indefinitely through both direct calls and iteration.
*/
export function createBoundedSource(minimum: number, maximum: number): NumberSource;Use this package to drive the numeric source behavior, including its handling of equal bounds.
Install with Tessl CLI
npx tessl i tessl/npm-unique-random