Showing 1-20 of 1,233 packages
math-random is an isomorphic, drop-in replacement for `Math.random` that uses cryptographically secure random number generation, where available
Seedable Math.random compatible pseudorandom number generator
This is a polyfill for `window.crypto.getRandomValues()`. In place of `Math.random()` it uses the [Mersenne Twister pseudorandom number generator](https://github.com/boo1ean/mersenne-twister) seeded by `Math.random()`.
Override Math.random
Math.random() as a deterministic jest mock function
Predict the output of Math.random
Similar to random-bytes-seed but returns a number between 0 and 1, similar to Math.random()
Predict Math.random output in Node, Deno, Bun, Chrome, Firefox, and Safari
A replacement for Math.random() that is tiny, fast, seedable, and has good statistical properties.
Access to a secure random source in a browser. `Math.random` is not acceptable for cryptographic operations. This module exports a consistent interface for modern browsers.
A better Math.random()
Generate random integers within a specified range. Simple wrapper around Math.random() with inclusive bounds.
A lightweight utility library for generating pseudo-random values in JavaScript based of `Math.random()`.
A cryptographically strong random number generator. Designed to be a drop-in replacement for Math.random. Can be used with Node or in a browser.
Simple Version 4 (random) UUID generator for browser, without any dependencies. Calls `Math.random()` twice to generate a single UUID.
Mock `Math.random` when run unit test cases with jest, output deterministic random number.
Math.random - but with AI
Fastest random ID and random string generation for Node.js
A mock generator to replace Math.random() for testing
TSLint rule to disallow Math.random() usage