How to use the pure-rand.skipN function in pure-rand

To help you get started, we’ve selected a few pure-rand examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dubzzz / fast-check / src / check / runner / Tosser.ts View on Github external
export function* toss(
  generator: IProperty,
  seed: number,
  random: (seed: number) => prand.RandomGenerator,
  examples: Ts[]
): IterableIterator<() => Shrinkable> {
  yield* examples.map(e => () => new Shrinkable(e));
  let idx = 0;
  let rng = random(seed);
  for (;;) {
    rng = prand.skipN(rng, 42);
    yield lazyGenerate(generator, rng, idx++);
  }
}

pure-rand

Pure random number generator written in TypeScript

MIT
Latest version published 4 months ago

Package Health Score

81 / 100
Full package analysis