A NodeJS module for rolling dice.

import { Die, Coin } from 'dnd-dice';

const faces = 50;
const d = new Die(faces);
console.log(d.value); // 1-50

const c = new Coin();
console.log(c.result); // heads/ tails


Offers a coin flip, a custom sided die and the standard dice for use with D&D:


Sometimes, you just need to flip a coin or roll a dice. Rather than write the code for that yourself, you may as well download yet another package to do it for you. This package was specifically designed with D&D in mind however.

On top of that, a simple dice rolling package like this is useful in all sorts of situations. Perhaps you need it for your own project and didn't want to spend the 30mins it would take to program this, in which case, this has got you covered!