# @randomized/random

> Randomness algorithms for JavaScript

Latest version **4.1.0** (published 2021-12-27) · AGPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install @randomized/random
pnpm add @randomized/random
yarn add @randomized/random
bun add @randomized/random
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.1.0 |
| Published | 2021-12-27 |
| First published | 2021-07-15 |
| Weekly downloads | 0 |
| License | AGPL-3.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 511.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| Author | make-github-pseudonymous-again |
| Maintainers | raskat, aureooms |
| Keywords | javascript, js, randfloat, randint, random, randomness, sample, shuffle |

## Links

- npm: https://www.npmjs.com/package/@randomized/random
- Repository: https://github.com/randomized-algorithm/random
- Homepage: https://randomized-algorithm.github.io/random
- Issues: https://github.com/randomized-algorithm/random/issues
- npm.io page: https://npm.io/package/@randomized/random

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 4.1.0 (latest) — 2021-12-27
- 4.0.0 — 2021-07-15
- 3.4.0 — 2021-07-15

## README

:game_die: [@randomized/random](https://randomized-algorithm.github.io/random)
==

<p align="center">
<a href="https://xkcd.com/1210">
<img src="https://imgs.xkcd.com/comics/im_so_random.png" width="600">
</a><br/>
© <a href="https://xkcd.com">xkcd.com</a>
</p>

Randomness algorithms for JavaScript.
See [docs](https://randomized-algorithm.github.io/random).
Parent is [js-algorithms](https://make-github-pseudonymous-again.github.io/js-algorithms).

> :warning: Depending on your environment, the code may require
> `regeneratorRuntime` to be defined, for instance by importing
> [regenerator-runtime/runtime](https://www.npmjs.com/package/regenerator-runtime).

```js
import {
	randint , // randint(i, j) -> [i, j[ \cap ZZ
	randfloat , // randfloat(i, j) -> [i, j[
	sample , // /!\ in-place
	shuffle , // /!\ in-place
} from '@randomized/random' ;
```

[![License](https://img.shields.io/github/license/randomized-algorithm/random.svg)](https://raw.githubusercontent.com/randomized-algorithm/random/main/LICENSE)
[![Version](https://img.shields.io/npm/v/@randomized/random.svg)](https://www.npmjs.org/package/@randomized/random)
[![Tests](https://img.shields.io/github/workflow/status/randomized-algorithm/random/ci:test?event=push&label=tests)](https://github.com/randomized-algorithm/random/actions/workflows/ci:test.yml?query=branch:main)
[![Dependencies](https://img.shields.io/librariesio/github/randomized-algorithm/random.svg)](https://github.com/randomized-algorithm/random/network/dependencies)
[![GitHub issues](https://img.shields.io/github/issues/randomized-algorithm/random.svg)](https://github.com/randomized-algorithm/random/issues)
[![Downloads](https://img.shields.io/npm/dm/@randomized/random.svg)](https://www.npmjs.org/package/@randomized/random)

[![Code issues](https://img.shields.io/codeclimate/issues/randomized-algorithm/random.svg)](https://codeclimate.com/github/randomized-algorithm/random/issues)
[![Code maintainability](https://img.shields.io/codeclimate/maintainability/randomized-algorithm/random.svg)](https://codeclimate.com/github/randomized-algorithm/random/trends/churn)
[![Code coverage (cov)](https://img.shields.io/codecov/c/gh/randomized-algorithm/random/main.svg)](https://codecov.io/gh/randomized-algorithm/random)
[![Code technical debt](https://img.shields.io/codeclimate/tech-debt/randomized-algorithm/random.svg)](https://codeclimate.com/github/randomized-algorithm/random/trends/technical_debt)
[![Documentation](https://randomized-algorithm.github.io/random/badge.svg)](https://randomized-algorithm.github.io/random/source.html)
[![Package size](https://img.shields.io/bundlephobia/minzip/@randomized/random)](https://bundlephobia.com/result?p=@randomized/random)

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