crypto-random

2.0.1 • Public • Published

Crypto-Random

tests

A zero dependency, cryptographically strong, random number generator.

Designed to be a drop-in replacement for Math.random. Can be used with Node or in the browser.

Supported Versions

  • Node 14.x+ (up to Node 18.x)
  • For supported browsers please refer to this MDN article.

Install

npm i crypto-random

Usage

const Random = require('crypto-random');

console.log(Random.value()); // a random float between 0 and 1. Replacement function for Math.random.
console.log(Random.range(10, 101)); // a random integer between 10 and 101.

Contributing

Feedback and any contributions are very welcome. Please open up an Issue or a Pull Request.

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i crypto-random

    Weekly Downloads

    370

    Version

    2.0.1

    License

    MIT

    Unpacked Size

    6.72 kB

    Total Files

    7

    Last publish

    Collaborators

    • skepticalhippo