aimless.js
On GitHub
The missing JavaScript randomness library.
  • Tiny
  • Unopinionated
  • Dependency Free

Randomness
bool()                       true
oneOf([1,2,3])               3
intRange(0,10)               4
intSequence(0,2)             2,0,1
char('awesome-sauce')        u
weighted([1,2], [1,5])       2

Special Generators
rand = seedFunc(1330)
rand()                       0.01
rand()                       0.95
rand()                       0.96

Seed functions are predictably random.

rand = uniqFuncSequence([1,2,3])
rand()                       2
rand()                       1
rand()                       3
rand()                       null

Unique functions will return unique.


Distributions
normalDist(mean, std) // x 10k

And More!!!

MIT © 2023 Christopher Cavalea

On GitHub