Open airjp73 opened 1 year ago
@airjp73 here you go!
{ tokens: [ { type: "DiceRoll", content: "1d6", position: 0, detailType: "_SimpleDieRoll", detail: { count: 1, numSides: 6 } }, { type: "Operator", position: 4, content: "+", operator: "+" }, { type: "DiceRoll", content: "3", position: 6, detailType: "_Constant", detail: 3 } ], rolls: [ [ 5 ], null, [] ], rollTotals: [ 5, null, 3 ], result: 8 }
Ran using the latest build of Bun, an all-in-one JavaScript runtime.
@robobun
import { roll } from '@airjp73/dice-notation';
console.log(roll('1d6 + 3').result);
@airjp73 here you go!
5
Ran using the latest build of Bun, an all-in-one JavaScript runtime.
@robobun