# randoml

> RandoML is a library of random numbers with the option of excluding or increasing the priority of a number

Latest version **1.0.0** (published 2020-02-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install randoml
pnpm add randoml
yarn add randoml
bun add randoml
```

## 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 | 1.0.0 |
| Published | 2020-02-13 |
| First published | 2019-02-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 10.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jakub Biesiada |
| Maintainers | jbiesiada |
| Keywords | TypeScript, random, number, exclude, library, machine learning |

## Links

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

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2020-02-13
- 2.0.0-beta.1 (beta) — 2021-05-12
- 2.0.0-beta.0 — 2021-05-12
- 1.0.0-beta.2 — 2020-02-12
- 1.0.0-beta.1 — 2020-02-12
- 0.6.0 — 2019-07-21
- 0.5.0 — 2019-02-27
- 0.5.0-beta.1 — 2019-02-14

## README

# [RandoML](https://github.com/jb1905/randoml)

[![NPM version](http://img.shields.io/npm/v/randoml.svg?style=flat-square)](https://www.npmjs.com/package/randoml)
[![NPM downloads](http://img.shields.io/npm/dm/randoml.svg?style=flat-square)](https://www.npmjs.com/package/randoml)

## About
RandoML is a library of random numbers with the option of excluding or increasing the priority of a number.

## How to Install
First, install the library in your project by npm:
```sh
$ npm install randoml
```

Or Yarn:
```sh
$ yarn add randoml
```

**You can also connect script via one of CDNs:**<br>
bundle.run: `https://bundle.run/randoml`<br>
jsDelivr: `https://cdn.jsdelivr.net/npm/randoml/`<br>
unpkg: `https://unpkg.com/randoml/`

## Getting Started
**Connect libary to project using script tag in HTML:**
```html
<script src="/path/to/randoml.js"></script>
```

**ES6 import:**
```js
import RandoML from 'randoml';
```

**Or CommonJS:**
```js
const RandoML = require('randoml');
```

Next use library:
```js
const random = new RandoML({
  settings: {
    // options...
  },
  callbacks: {
    // callbacks...
  }
});
```

## Methods
**&bull; Choose:**
```js
random.choose();
```

## Options
### Settings
Name | Type | Default | Description | Available options
-|-|-|-|-
min | number | `1` | minimum random value | number (smaller than `max`)
max | number | `15` | maxmum random value | number (bigger than `min`)
exclude | number[] | `null` | numbers excluded from choice | array of numbers (in range between min and max)
hold | number[] | `null` | numbers with higher priority (bigger possibility) | array of numbers (in range between min and max)

### Callbacks
Name | Description | Available options
-|-|-
onInit | callback on library init | `() => { /* code */ }`
onChoice | callback on number choice | `() => { /* code */ }`
onResult | callback on choice result | `() => { /* code */ }`
onRangeEnd | callback when range length is 0 | `() => { /* code */ }`

## License
This project is licensed under the MIT License © 2019-present Jakub Biesiada

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