Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

fantasy-dice

mattconsto11ISC1.0.2

Dice equation roller

dice, equation, roller, d6, d8, d10, d12, d20, d100, df

readme

dice

A Jison DnD style dice roller. Simply supply a string and it will parse it into a roll. Supports arithmetic, keeping high/low dice, and fudge dice.

Usage

npm install fantasy-dice [-g]

roll 4d6h3

echo -e "var dice = require('fantasy-dice');\nconsole.log(dice("4d6h3"));" > dice.js
node dice.js