0.0.2 • Published 7 years ago

dicelang v0.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

dicelang

A JavaScript interpreter for Roll20's Dice Specification.

Installing

npm i --save dicelang

Usage

See the doc directory for full documentation.

TypeScript

import { Dice } from 'dicelang';

let d: Dice = new Dice('d20');
alert(d.roll()); // 20
alert(d.roll()); // 1
alert(d.roll()); // 12

ES6

import { Dice } from 'dicelang';

let d = new Dice('d20');
alert(d.roll()); // 11
alert(d.roll()); // 5
alert(d.roll()); // 17

License

This software is licensed under the terms of the MIT license. See the LICENSE file.

The Roll20 Dice Specification is provided under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported license (CC BY-NC-SA 3.0) by The Orr Group, LLC. See the CC-BY-NC-SA-3.txt file or the Creative Commons website.