UNPKG

@half-elf/rogue

Version:

Utility library for all underhanded d20 needs.

15 lines (11 loc) 343 B
# Rogue Utility library for all underhanded d20 needs. ## Usage ### Dice library ```js 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; ```