dicelang
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

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.

/dicelang/

    Package Sidebar

    Install

    npm i dicelang

    Weekly Downloads

    1

    Version

    0.0.2

    License

    MIT

    Last publish

    Collaborators

    • yuey