Skip to content

sampleIntegers

sampleIntegers(count, min, max): number[]

Defined in: src/global/numbers.ts:227

count distinct integers in [min, max], without materialising the range.

number

number

number

number[]

sampleIntegers(6, 1, 49); // [ 12, 3, 41, 28, 7, 33 ]
sampleIntegers(3, 0, 1_000_000_000); // fine: the range is never built