-
Tom French authoredTom French authored
utils.js 194 B
function amountToInteger(n) {
return Math.round(n * 100);
}
function integerToAmount(n) {
return parseFloat((n / 100).toFixed(2));
}
module.exports = { amountToInteger, integerToAmount };