This is a feature request to add a new public function to parse previously parsed dice roll input strings (RootType) along with a provided DiceRollResult object so it can be parsed into a final RollBase object.
The application here is that I have created a 3D dice roller (using BabylonJS) that is capable of rolling dice on a canvas element and returns the face up value of the die rolled. I'd like to be able to return a "previously parsed dice roll input string" along with the roll results as an array of DiceRollResult objects to then have dice-roller-parser compute the final RollBase object. I really enjoy all the features of this package and would like to leverage it for my app.
Based on a quick review of the code, I think a good approach may be to allow the private RollType function to accept another argument of rolls: DiceRollResult that it can then pass onto the various rollType function. Then, if the rolls argument is undefined, rolls will be calculated by generateDiceRoll. Otherwise it will use the provided object. Is this feasible?
This is a feature request to add a new public function to parse previously parsed dice roll input strings (
RootType) along with a providedDiceRollResultobject so it can be parsed into a finalRollBaseobject.The application here is that I have created a 3D dice roller (using BabylonJS) that is capable of rolling dice on a canvas element and returns the face up value of the die rolled. I'd like to be able to return a "previously parsed dice roll input string" along with the roll results as an array of
DiceRollResultobjects to then have dice-roller-parser compute the finalRollBaseobject. I really enjoy all the features of this package and would like to leverage it for my app.Based on a quick review of the code, I think a good approach may be to allow the
private RollTypefunction to accept another argument ofrolls: DiceRollResultthat it can then pass onto the various rollType function. Then, if the rolls argument is undefined, rolls will be calculated bygenerateDiceRoll. Otherwise it will use the provided object. Is this feasible?