https://github.com/bash-archive/random.js
:game_die: A deterministic random number generator for node
https://github.com/bash-archive/random.js
Last synced: over 1 year ago
JSON representation
:game_die: A deterministic random number generator for node
- Host: GitHub
- URL: https://github.com/bash-archive/random.js
- Owner: bash-archive
- License: agpl-3.0
- Archived: true
- Created: 2017-03-19T11:34:42.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2025-02-19T22:16:46.000Z (over 1 year ago)
- Last Synced: 2025-03-02T15:44:51.436Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 244 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- License: license.txt
Awesome Lists containing this project
README
# 🎲 random.js
[](https://github.com/bash/random.js/actions)
[](https://ci.appveyor.com/project/rschmidmeister/random-js)
[](https://coveralls.io/github/bash/random.js?branch=tooling)
[](https://codeclimate.com/github/bash/random.js)
[](https://www.npmjs.com/package/@rschmidmeister/random.js)

A *deterministic random number* generator for node.
This module has some important advantages over other modules:
- Only **400 bytes** in size (without gzip)!
- **O(1)** complexity
- **100%** test coverage
## Supported algorithms
* [Fair Dice Roll](https://www.xkcd.com/221/)
* [Dilbert Oracle](https://web.archive.org/web/20230305130209/https://dilbert.com/strip/2001-10-25)
## Installation
```bash
npm i --save @/random.js
```
## Usage
```js
const { fairDiceRoll, dilbertOracle } = require('@/random.js')
console.log(fairDiceRoll())
console.log(dilbertOracle())
```
## Roadmap
This project has a very ambitious roadmap
for discovering and implementing new algorithms.
We are working hard to ship new algorithm by these dates.
Note that these dates are estimates and are thus subject to change.
* Q2 2040: Implement 2 new algorithms.
* Q4 2050: Implement 5 additional algorithms.
* Q1 2060: Rewrite this project in Rust.
* Q3 2070: Delete both the project and its rewrite.