Skip to content

fromPureRand

fromPureRand(generator): Engine

Defined in: src/compat.ts:88

Adopt a pure-rand generator.

unsafeNext mutates the generator in place, which is the fast path that library offers and the one an engine wants.

PureRandLike

Engine

// import prand from "pure-rand";
// const source = fromPureRand(prand.xoroshiro128plus(42));
// new Random(source).integer(1, 6);