# meteor-random-node

> Meteor's Random Package for Straight Node – with built in crypto module

Latest version **2.0.0** (published 2020-08-23) · BSD-2-Clause license · 0 weekly downloads

## Install

```sh
npm install meteor-random-node
pnpm add meteor-random-node
yarn add meteor-random-node
bun add meteor-random-node
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2020-08-23 |
| First published | 2018-05-09 |
| Weekly downloads | 0 |
| License | BSD-2-Clause |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 15.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Trever Faden |
| Maintainers | dvelopment |
| Keywords | random, meteor, crypto, api, key, generator, api, keys, tokens, UUID |

## Links

- npm: https://www.npmjs.com/package/meteor-random-node
- Repository: https://github.com/dVelopment/meteor-random
- Issues: https://github.com/dVelopment/meteor-random/issues
- npm.io page: https://npm.io/package/meteor-random-node

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2020-08-23
- 1.0.6 — 2020-08-13
- 1.0.5 — 2020-08-13
- 1.0.4 — 2020-08-13
- 1.0.3 — 2020-07-31
- 1.0.2 — 2020-07-31
- 1.0.1 — 2020-07-31
- 1.0.0 — 2020-07-31
- 0.0.5 — 2018-05-09
- 0.0.4 — 2018-05-09

## README

# meteor-random-node

Meteor's Random Package, Stripped for Straight Node

```
  Random = require('meteor-random-node');
```

The random package provides several functions for generating random numbers. It uses a cryptographically strong pseudorandom number generator when possible, but falls back to a weaker random number generator when cryptographically strong randomness is not available (on older browsers or on servers that don't have enough entropy to seed the cryptographically strong generator).

-   `Random.id([n])`
    Returns a unique identifier, such as "Jjwjg6gouWLXhMGKW", that is likely to be unique in the whole world. The optional argument n specifies the length of the identifier in characters and defaults to 17.

-   `Random.secret([n])`
    Returns a random string of printable characters with 6 bits of entropy per character. The optional argument n specifies the length of the secret string and defaults to 43 characters, or 256 bits of entropy. Use Random.secret for security-critical secrets that are intended for machine, rather than human, consumption.

-   `Random.fraction()`
    Returns a number between 0 and 1, like Math.random.

-   `Random.choice(arrayOrString)`
    Returns a random element of the given array or string.

-   `Random.hexString(n)`
    Returns a random string of n hexadecimal digits.

For more information see [Meteor's Random Docs](http://docs.meteor.com/#/full/random)

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