# npm-random

> A collection of helper functions to make randomness easier

Latest version **1.0.2** (published 2016-05-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install npm-random
pnpm add npm-random
yarn add npm-random
bun add npm-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.2 |
| Published | 2016-05-24 |
| First published | 2016-05-23 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | BrianDGLS |
| Maintainers | briandgls |
| Keywords | random |

## Links

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

## Recent versions

- 1.0.2 (latest) — 2016-05-24
- 1.0.1 — 2016-05-23
- 1.0.0 — 2016-05-23

## README

# npm-random

A collection of helper functions to make randomness easier

## Install

	npm install npm-random


## Functions

 - `bool`: Returns `true` or `false`
 - `float`: Returns a random number between min (inclusive) and max (exclusive)
 - `number`: Returns a random integer between min (included) and max (excluded)
 - `number_inclusive`: Returns a random integer between min(included) and max (included)
 - `choice`: Returns a random item from the input arr
 - `property`: Returns a random property from an object

## Usage

	const random = require('npm-random')

	// True or False
	random.bool()

	// Random float between 1 and 5
	random.float(1, 5)

	// Random number between 1 and 5
	random.number(1, 5)

	// Random number between 1 and including 5
	random.number_inclusive(1, 5)

	// Picks a random item in the array
	random.choice([1,2,3,4,5])

	// Picks a random property
	random.property({a: 1, b:2, c: 3})


### NPM

[https://www.npmjs.com/package/npm-random](https://www.npmjs.com/package/npm-random)

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