2.0.2 • Published 1 year ago
funkydice v2.0.2
Funkydice
Roll all kinds of dice using string commands like 1d20+1
Supports all kinds of "dice", from 1d2
to 1d10000
.
Also supports Fate dice by using 4df
and the d66 with 1d66
Usage
import { funkydie } from 'funkydice'
const result = funkydie('1d20+1')
The type of result is an object made with of the following type:
amount: number;
faces: number | "f";
modifier: number;
rolls: number[];
total: number;
totalUnmodified: number;
It's also possible to write multiple commands:
funkydice('1d6,2d8,9d30+2')
This will return an array of the result object above.
2.0.2
1 year ago
2.0.1
1 year ago
1.0.13
2 years ago
2.0.0
2 years ago
1.0.11
3 years ago
1.0.12
3 years ago
1.0.9
3 years ago
1.0.8
3 years ago
1.0.10
3 years ago
1.0.7
3 years ago
1.0.6
3 years ago
1.0.5
3 years ago
1.0.4
3 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago
0.9.3
3 years ago
0.9.2
3 years ago
0.9.1
3 years ago
0.9.0
3 years ago