ryndom
v1.0.2
Published
Blazing fast 53-bit xoshiro128** RNG with infinite seeds and zero collision
Maintainers
Readme
🎲 Ryndom
A seeded random number generator for JavaScript.
npm i ryndomExample
import Random from 'ryndom'
const rng = new Random('my-seed')
rng.next()
rng.nextInt(1, 100)
rng.nextFloat(0, 10)
rng.choice(['a', 'b', 'c'])
rng.shuffle([1, 2, 3, 4, 5])Features
- Seeded and deterministic
- Xoshiro256**
- 53-bit floating-point output
- String, number, BigInt and array seeds
- Integer and floating-point ranges
- Weighted selection
- Shuffle and sampling
- Gaussian and other probability distributions
- Random bytes and UUIDs
- State save/restore
- Clone and jump support
- Zero dependencies
License
MIT
