Skip to content

Commit 3c409bf

Browse files
committed
feat: add rollCallback to roll.detailed()
1 parent 8459306 commit 3c409bf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ const roll = function (rollString, rollCallback = () => {}) {
3939
return round(result);
4040
};
4141

42-
roll.detailed = function (rollString) {
42+
roll.detailed = function (rollString, rollCallback = () => {}) {
4343
const rolls = [];
4444
const result = roll(rollString, (roll, result) => {
45+
rollCallback(roll, result);
4546
rolls.push({
4647
roll,
4748
result

0 commit comments

Comments
 (0)