npm.io
1.0.1 • Published 6 years ago

@half-elf/rogue

Licence
MIT
Version
1.0.1
Deps
1
Size
4 kB
Vulns
0
Weekly
0

Rogue

Utility library for all underhanded d20 needs.

Usage

Dice library

const { roll } = require('@half-elf/rogue');

const singleRoll = roll('d20');
const weirdCompositeRoll = roll('(d4)d6 + 4');
const rollWithOptions = roll('20d4', { max: true, min: true, avg: true });

const { total, max, min, avg } = rollWithOptions;

Keywords