1.4.2 • Published 3 months ago

mini-diceroller v1.4.2

Weekly downloads
-
License
MPL-2.0
Repository
github
Last release
3 months ago

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'
1.4.2

3 months ago

1.4.1

3 months ago

1.4.0

3 months ago