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

1.4.2 • Public • Published

Mini Diceroller

NPM Registry

Demo Site

A mini language written using ts-parsec to evaluate a string of rolled dice with arthritic expressions

Supported Tokens

  • Parenthesis - (1d20 + 2) * 2
  • Addition/Subtraction - 1d20 + 17 - 8
  • Multiplication/Division - 1d20 / 2

npm Commands

  • npm run test - Runs test suit
  • npm run build - Runs and outputs compiled typescript

Local REPL

[mini-diceroller]$ node 
> const cmd = await import("./dist/index.js")
> cmd.cmdEvaluate("1d20 + 2")
'[13] + 2 > 15'

Readme

Keywords

none

Package Sidebar

Install

npm i mini-diceroller

Weekly Downloads

0

Version

1.4.2

License

MPL-2.0

Unpacked Size

59.7 kB

Total Files

10

Last publish

Collaborators

  • plaidevie