# metstrike-random

> NPM standalone version of Meteor group Random package

Latest version **1.0.10** (published 2017-04-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install metstrike-random
pnpm add metstrike-random
yarn add metstrike-random
bun add metstrike-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.10 |
| Published | 2017-04-23 |
| First published | 2017-04-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | metstrike |
| Maintainers | metstrike |

## Links

- npm: https://www.npmjs.com/package/metstrike-random
- Repository: https://github.com/metstrike/meteor
- Homepage: https://github.com/metstrike/meteor#readme
- Issues: https://github.com/metstrike/meteor/issues
- npm.io page: https://npm.io/package/metstrike-random

## Dependencies (1)

- [underscore](https://npm.io/package/underscore.md) ^1.8.3

## Recent versions

- 1.0.10 (latest) — 2017-04-23

## README

# random
[Source code of released version](https://github.com/meteor/meteor/tree/master/packages/random) | [Source code of development version](https://github.com/meteor/meteor/tree/devel/packages/random)
***

#### This version is minimally modified to work with NPM in support of the [React Meteor Standalone Mixin](https://www.npmjs.com/package/meteor-standalone-react-mixin) ####

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.

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