3 lines
172 B
JavaScript
3 lines
172 B
JavaScript
const toCurrency = (n, curr, LanguageFormat = undefined) =>
|
|
Intl.NumberFormat(LanguageFormat, { style: 'currency', currency: curr }).format(n);
|
|
module.exports = toCurrency; |