This repository was archived by the owner on Feb 19, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change 1
1
declare module '@rschmidmeister/random.js' {
2
2
// chosen by fair dice roll. guaranteed to be random.
3
- function random ( ) : number ;
4
- export = random ;
3
+ export function fairDiceRoll ( ) : number ;
4
+ // Troll: Nine nine nine nine nine nine
5
+ export function dilibertOracle ( ) : number ;
6
+ export = fairDiceRoll ;
5
7
}
Original file line number Diff line number Diff line change 10
10
[ ![ devDependencies Status] ( https://david-dm.org/bash/random.js/dev-status.svg )] ( https://david-dm.org/bash/random.js?type=dev )
11
11
![ gluten free] ( https://img.shields.io/badge/gluten-free-green.svg )
12
12
13
-
14
- A [ deterministic random number] ( https://www.xkcd.com/221/ ) generator for node.
13
+ A * deterministic random number* generator for node.
15
14
This module has some important advantages over other modules:
16
15
17
- - Only ** 82 bytes** in size (without gzip)!
16
+ - Only ** 400 bytes** in size (without gzip)!
18
17
- ** O(1)** complexity
19
18
- ** 100%** test coverage
20
19
21
- Install with:
20
+ ## Supported algorithms
21
+
22
+ - [ Fair Dice Roll] ( https://www.xkcd.com/221/ )
23
+ - [ Dilibert Oracle] ( https://dilbert.com/strip/2001-10-25 )
24
+
25
+ ## Installation
22
26
23
27
``` bash
24
28
npm i --save @rschmidmeister/random.js
25
29
```
26
30
27
- Usage:
31
+ ## Usage
28
32
29
33
``` js
30
- const random = require (' @rschmidmeister/random.js' )
31
-
32
- console .log (random ())
34
+ const { fairDiceRoll , dilibertOracle } = require (' @rschmidmeister/random.js' )
35
+ console . log ( fairDiceRoll ())
36
+ console .log (dilibertOracle ())
33
37
```
You can’t perform that action at this time.
0 commit comments