# quantum-random

> Generate a truly random hexadecimal string.

Latest version **1.0.0** (published 2020-10-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install quantum-random
pnpm add quantum-random
yarn add quantum-random
bun add quantum-random
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-10-05 |
| First published | 2020-10-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10.17 |
| Dependencies | 3 |
| Unpacked size | 4.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Richie Bendall |
| Maintainers | richienb |
| Keywords | quantum, random, generate, string, seed, hex, hexadecimal, math, prng, qrng |

## Links

- npm: https://www.npmjs.com/package/quantum-random
- Repository: https://github.com/Richienb/quantum-random
- npm.io page: https://npm.io/package/quantum-random

## Dependencies (3)

- [ky](https://npm.io/package/ky.md) ^0.24.0
- [ky-universal](https://npm.io/package/ky-universal.md) ^0.8.2
- [round-intervals](https://npm.io/package/round-intervals.md) ^1.1.0

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2020-10-05

## README

# quantum-random [![Travis CI Build Status](https://img.shields.io/travis/com/Richienb/quantum-random/master.svg?style=for-the-badge)](https://travis-ci.com/Richienb/quantum-random)

Generate a truly random hexadecimal string. Useful for seeding [pseudorandom number generators](https://en.wikipedia.org/wiki/Pseudorandom_number_generator).

[![NPM Badge](https://nodei.co/npm/quantum-random.png)](https://npmjs.com/package/quantum-random)

## Install

```sh
npm install quantum-random
```

## Usage

```js
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](https://en.wikipedia.org/wiki/Pseudorandom_number_generator), it should ideally [be equal to](https://stackoverflow.com/a/50411024/8384910) the [state length](https://en.wikipedia.org/wiki/State-space_representation) of the algorithm used.

---
_Source: https://npm.io/package/quantum-random · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
