This package has been deprecated

Author message:

This package has moved to @entropy-source/pseudo-random.

@aureooms/js-pseudo-random

2.0.0 • Public • Published

🎲 @aureooms/js-pseudo-random

Pseudorandom number generators for JavaScript. See docs.

⚠️ The code requires regeneratorRuntime to be defined, for instance by importing regenerator-runtime/runtime.

import {
  splitmix64,
  nextFloat64,
  nextUint64,
} from '@aureooms/js-pseudo-random';

const seed = [0, 0]; // Two 32-bit signed integers.
const prng = splitmix64(seed);
nextUint64(prng); // 64 random bits as two 32-bit signed integers (compatible with @aureooms/js-uint64).
nextFloat64(prng); // A random double in the range [0, 1[.

License Version Build Dependencies Dev dependencies GitHub issues Downloads

Code issues Code maintainability Code coverage (cov) Code technical debt Documentation Package size

📜 References

Package Sidebar

Install

npm i @aureooms/js-pseudo-random

Weekly Downloads

6

Version

2.0.0

License

AGPL-3.0

Unpacked Size

457 kB

Total Files

26

Last publish

Collaborators

  • aureooms