unstale

npm / pure-rand

pure-rand

What changed in pure-rand 8, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-03.

9 breaking4 new APIs and options11 performance

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.9 on npm

pure-rand 824 changes

Breaking changes 9

  • Functions mutate rng in place and return the generated value by default; the old pure tuple-returning functions have been removed.

    8.0.0release notes

  • Generators supporting jump() now implement a dedicated interface extending RandomGenerator.

    8.0.0release notes

  • The main entry point is removed; replace barrel imports with subpath imports for distributions, generators, and utilities.

    8.0.0release notes

  • Wrap a distribution function with purify to get the old pure behavior, returning a value and next-generator tuple.

    8.0.0release notes

  • All functions now take the generator as their first parameter.

    8.0.0release notes

  • uniformArrayInt and unsafeUniformArrayIntDistribution are removed.

    8.0.0release notes

  • The former unsafeUniformBigIntDistribution name is replaced by uniformBigInt; uniformBigIntDistribution's pure behavior is available through purify(uniformBigInt).

    8.0.0release notes

  • The former unsafeUniformIntDistribution name is replaced by uniformInt; uniformIntDistribution's pure behavior is available through purify(uniformInt).

    8.0.0release notes

  • Restore a generator from its state using a dedicated exported function instead of fromState on the generator.

    8.0.0release notes

New APIs and options 4

Performance 11

  • Restores next() speed by dropping undefined field initialization.

    8.4.2release notes

  • The next operation was sped up using parallel-LCG advance.

    8.4.1release notes

  • A bit-identical formula reassociation sped up uniformFloat64 by 7%.

    8.4.1release notes

  • The jump operation was sped up.

    8.4.1release notes

  • The jump operation was sped up.

    8.4.1release notes

  • The congruential32 generator is faster with imul.

    8.3.0release notes

  • Pre-computed values eliminate computation at import time.

    8.3.0release notes

  • Initialization is faster, reducing the cost of starting the mersenne generator.

    8.2.0release notes

  • Twisting is faster, improving mersenne generator performance.

    8.2.0release notes

  • Uses fewer memory allocations, reducing allocation overhead for the mersenne generator.

    8.2.0release notes

  • uniformInt is faster on large ranges.

    8.0.0release notes