Experimental
Format currency into human readable string
Optional
Add padding result if there's no currencies, by default "0 gp".
pf1.utils.currency.format({gp: 0.15}); // => "1 sp, 5 cp"pf1.utils.currency.format({cp: 1500}); // => "15 gp"pf1.utils.currency.format({pp: 2, gp: 20, cp: 33}); // => "40 gp, 3 sp, 3 cp"pf1.utils.currency.format({pp: 0}); // => "0 gp"pf1.utils.currency.format({gp: 0}, {pad:false}); // => "" Copy
pf1.utils.currency.format({gp: 0.15}); // => "1 sp, 5 cp"pf1.utils.currency.format({cp: 1500}); // => "15 gp"pf1.utils.currency.format({pp: 2, gp: 20, cp: 33}); // => "40 gp, 3 sp, 3 cp"pf1.utils.currency.format({pp: 0}); // => "0 gp"pf1.utils.currency.format({gp: 0}, {pad:false}); // => ""
Format currency into human readable string