UNPKG

@randsum/dice

Version:

A flexible, type-safe dice roller for tabletop RPGs, game development, and probability simulations

10 lines (9 loc) 234 B
export function rollType(rolls) { if (rolls.every((roll) => roll.type === 'numeric')) { return 'numeric'; } if (rolls.every((roll) => roll.type === 'custom')) { return 'custom'; } return 'mixed'; }