# What changed in pure-rand

> 24 changes in pure-rand 8 from its official release notes, upgrade guides and advisories: 9 breaking, 4 new APIs and options. Each one cited. Sources checked 2026-11-03. HTML: https://unstale.sh/npm/pure-rand/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## pure-rand 8

### Breaking changes

- Functions mutate rng in place and return the generated value by default; the old pure tuple-returning functions have been removed. (8.0.0) — [release notes](https://github.com/dubzzz/pure-rand/blob/be10b22b05c22242eb077388b0eb97882e9bbf87/CHANGELOG.md#800)
- Generators supporting jump() now implement a dedicated interface extending RandomGenerator. (8.0.0) — [release notes](https://github.com/dubzzz/pure-rand/blob/be10b22b05c22242eb077388b0eb97882e9bbf87/CHANGELOG.md#800)
- The main entry point is removed; replace barrel imports with subpath imports for distributions, generators, and utilities. (8.0.0) — [release notes](https://github.com/dubzzz/pure-rand/blob/be10b22b05c22242eb077388b0eb97882e9bbf87/CHANGELOG.md#800)
- Wrap a distribution function with purify to get the old pure behavior, returning a value and next-generator tuple. (8.0.0) — [release notes](https://github.com/dubzzz/pure-rand/blob/be10b22b05c22242eb077388b0eb97882e9bbf87/CHANGELOG.md#800)
- All functions now take the generator as their first parameter. (8.0.0) — [release notes](https://github.com/dubzzz/pure-rand/blob/be10b22b05c22242eb077388b0eb97882e9bbf87/CHANGELOG.md#800)
- uniformArrayInt and unsafeUniformArrayIntDistribution are removed. (8.0.0) — [release notes](https://github.com/dubzzz/pure-rand/blob/be10b22b05c22242eb077388b0eb97882e9bbf87/CHANGELOG.md#800)
- The former unsafeUniformBigIntDistribution name is replaced by uniformBigInt; uniformBigIntDistribution's pure behavior is available through purify(uniformBigInt). (8.0.0) — [release notes](https://github.com/dubzzz/pure-rand/blob/be10b22b05c22242eb077388b0eb97882e9bbf87/CHANGELOG.md#800)
- The former unsafeUniformIntDistribution name is replaced by uniformInt; uniformIntDistribution's pure behavior is available through purify(uniformInt). (8.0.0) — [release notes](https://github.com/dubzzz/pure-rand/blob/be10b22b05c22242eb077388b0eb97882e9bbf87/CHANGELOG.md#800)
- Restore a generator from its state using a dedicated exported function instead of fromState on the generator. (8.0.0) — [release notes](https://github.com/dubzzz/pure-rand/blob/be10b22b05c22242eb077388b0eb97882e9bbf87/CHANGELOG.md#800)

### New APIs and options

- Implement jump for mersenne. (8.3.0) — [release notes](https://github.com/dubzzz/pure-rand/blob/be10b22b05c22242eb077388b0eb97882e9bbf87/CHANGELOG.md#830)
- Adds the uniformFloat32 distribution. (8.1.0) — [release notes](https://github.com/dubzzz/pure-rand/blob/be10b22b05c22242eb077388b0eb97882e9bbf87/CHANGELOG.md#810)
- Adds the uniformFloat64 distribution. (8.1.0) — [release notes](https://github.com/dubzzz/pure-rand/blob/be10b22b05c22242eb077388b0eb97882e9bbf87/CHANGELOG.md#810)
- congruential32 gains a jump() method. (8.0.0) — [release notes](https://github.com/dubzzz/pure-rand/blob/be10b22b05c22242eb077388b0eb97882e9bbf87/CHANGELOG.md#800)

### Performance

- Restores next() speed by dropping undefined field initialization. (8.4.2) — [release notes](https://github.com/dubzzz/pure-rand/blob/be10b22b05c22242eb077388b0eb97882e9bbf87/CHANGELOG.md#842)
- The next operation was sped up using parallel-LCG advance. (8.4.1) — [release notes](https://github.com/dubzzz/pure-rand/blob/be10b22b05c22242eb077388b0eb97882e9bbf87/CHANGELOG.md#841)
- A bit-identical formula reassociation sped up uniformFloat64 by 7%. (8.4.1) — [release notes](https://github.com/dubzzz/pure-rand/blob/be10b22b05c22242eb077388b0eb97882e9bbf87/CHANGELOG.md#841)
- The jump operation was sped up. (8.4.1) — [release notes](https://github.com/dubzzz/pure-rand/blob/be10b22b05c22242eb077388b0eb97882e9bbf87/CHANGELOG.md#841)
- The jump operation was sped up. (8.4.1) — [release notes](https://github.com/dubzzz/pure-rand/blob/be10b22b05c22242eb077388b0eb97882e9bbf87/CHANGELOG.md#841)
- The congruential32 generator is faster with imul. (8.3.0) — [release notes](https://github.com/dubzzz/pure-rand/blob/be10b22b05c22242eb077388b0eb97882e9bbf87/CHANGELOG.md#830)
- Pre-computed values eliminate computation at import time. (8.3.0) — [release notes](https://github.com/dubzzz/pure-rand/blob/be10b22b05c22242eb077388b0eb97882e9bbf87/CHANGELOG.md#830)
- Initialization is faster, reducing the cost of starting the mersenne generator. (8.2.0) — [release notes](https://github.com/dubzzz/pure-rand/blob/be10b22b05c22242eb077388b0eb97882e9bbf87/CHANGELOG.md#820)
- Twisting is faster, improving mersenne generator performance. (8.2.0) — [release notes](https://github.com/dubzzz/pure-rand/blob/be10b22b05c22242eb077388b0eb97882e9bbf87/CHANGELOG.md#820)
- Uses fewer memory allocations, reducing allocation overhead for the mersenne generator. (8.2.0) — [release notes](https://github.com/dubzzz/pure-rand/blob/be10b22b05c22242eb077388b0eb97882e9bbf87/CHANGELOG.md#820)
- uniformInt is faster on large ranges. (8.0.0) — [release notes](https://github.com/dubzzz/pure-rand/blob/be10b22b05c22242eb077388b0eb97882e9bbf87/CHANGELOG.md#800)
