Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

range-unique-sampler GitHub license

Sample random unique integers within a range.

Usage

import uniqueSampler from 'range-unique-sampler';

// Sample integers in range 100 (inclusive) - 500 (exclusive).
const sample = uniqueSampler(100,500);

sample() // 123
sample() // x:[100-499] \ 123

// Sample 50 unique integers 0-999.
const samples = Array.from({length: 50}, uniqueSampler(0,1000))

About

Sample random unique integers within a range

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages