UNPKG

@randsum/dice

Version:

A flexible, type-safe dice roller

9 lines 335 B
import { generateKey, normalizeArgument, rollResultFromDicePools } from './utils'; function roll(...args) { const dicePools = { dicePools: Object.fromEntries(args.map((arg) => [generateKey(), normalizeArgument(arg)])) }; return rollResultFromDicePools(dicePools); } export { roll }; //# sourceMappingURL=roll.js.map