View Code? Open in Web Editor
NEW
This project forked from 3d-dice /dice-parser-interface
Dice Parser that handles advanced roll notation for @3d-dice/dice-box
Home Page: https://fantasticdice.games/
License: MIT License
JavaScript 0.51%
TypeScript 99.49%
fdp's People
Contributors
fdp's Issues
Fixing issue #2 will result in the dice-roller-parser returning NAN as a function.
DiceRoller takes a random function into the constructor. If issue #2 is fixed then its passed a function with a bunch of returns that are NaN.
Dice parser says parsedNotation should be RootType but the types are wrong in the dice roller parser
handleRerolls is looking for a mods key which does not appear to be coming back from dice parser.
handleRerolls has no references
mods: obj.mods
, but this does not exist on DieGroups
recursiveSearch has an else if (value && typeof value === "object")
which runs on arrays because an arrray's typefop is "object". This seems like unintended behavior.
rollNotation has 0 references
Dicebox / FDP does not support using ! such as 10d6>5!
incrementId mutates the key passed into it and the array from the split. Fix this.
parseNotation should take in a roll object for Dicebox which allows for setting themes on dice.
updateFloats appears to be incorrectly looping through array/object. Its trying to do math on a string and results in NaN.
Typescript does not like calling objects like this when the key is not specified to be a string. An expect error was added that needs to be removed.
initParser needs tests to check for what happens when this.rollsAsFloats is not empty. This is not set on initialization or by the constructor. Need find a way to test this and its likely impacted by issue #2 and issue #5 .
Test needs to fix for testing clear. parser.finalResults needs value
parseFinalResults final results cannot be called unless parseNotation has been called first. There is an error related to null due to this dependancy.
handleRerolls is not referenced and could be removed