export function currencyFormat(num) { let val = num ? num : 0; return val.toLocaleString('en-US', { minimumFractionDigits: 2 }); } export function zeroPad(num, places) { num = num ? num : 0; var zero = places - num.toString().length + 1; return Array(+(zero > 0 && zero)).join("0") + num; }