quantum-random
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

quantum-random Travis CI Build Status

Generate a truly random hexadecimal string. Useful for seeding pseudorandom number generators.

NPM Badge

Install

npm install quantum-random

Usage

const quantumRandom = require("quantum-random")
const Chance = require("chance")
 
const chance = new Chance(await quantumRandom({ size: 19937 }))

API

quantumRandom(options?)

Get a randomly generated hexadecimal string. Returns a promise that resolves with a string.

options

Type: object

size

Type: number
Default: 1024

The amount of hexadecimal characters to generate. If used to seed a pseudorandom number generator, it should ideally be equal to the state length of the algorithm used.

Package Sidebar

Install

npm i quantum-random

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

4.62 kB

Total Files

6

Last publish

Collaborators

  • richienb