gammatools/web/assets/js/formatDiceMnemonic.js

6 lines
197 B
JavaScript
Raw Normal View History

export function formatDiceMnemonic(data) {
return Array.isArray(data) ?
data[0] + "d" + data[1] + (data[2] === 0 ? "" : (data[2] > 0 ? "+" : "") + data[2]) :
data.toString();
}