# just-random-integer

> Produces an integer between two values

Latest version **4.2.0** (published 2022-12-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install just-random-integer
pnpm add just-random-integer
yarn add just-random-integer
bun add just-random-integer
```

## Health

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

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

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.2.0 |
| Published | 2022-12-17 |
| First published | 2021-05-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6200 |
| Author | evandrolg |
| Maintainers | angus-c |
| Keywords | random, range, just |

## Links

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

## Recent versions

- 4.2.0 (latest) — 2022-12-17
- 4.1.1 — 2022-08-08
- 4.1.0 — 2022-08-07
- 4.0.0 — 2021-12-29
- 3.0.1 — 2021-11-13
- 3.0.0 — 2021-11-09
- 2.1.1 — 2021-11-01
- 2.1.0 — 2021-10-31
- 1.0.0 — 2021-05-08

## README

<!-- DO NOT EDIT THIS FILE! THIS FILE WAS AUTOGENERATED BY TEMPLATE-MATE -->
<!-- SEE https://github.com/angus-c/just/blob/master/CONTRIBUTING.md#readme-template -->

## just-random-integer

Part of a [library](https://anguscroll.com/just) of zero-dependency npm modules that do just do one thing.
Guilt-free utilities for every occasion.

[`🍦 Try it`](https://anguscroll.com/just/just-random-integer)

```shell
npm install just-random-integer
```
```shell
yarn add just-random-integer
```

Produces a random integer within a given range

```js
import random from 'just-random-integer';

random();
// Returns either 0 or 1
random(5);
// Returns a random integer between 0 and 5 (inclusively)
random(3, 10);
// Returns a random integer between 3 and 10 (inclusively)
random(-5.8, 10.4);
// Returns a random integer between -5 and 10 (inclusively)
```

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