1/* https://www.npmjs.com/package/format-money-js */
2
3const { FormatMoney } = require('format-money-js');
4
5const fm = new FormatMoney({
6 decimals: 2
7});
8
9console.log(fm.from(12345.67, { symbol: '$' })); // return string: $12,345.67
10console.log(fm.un('€12,345;67')); // return number: 12345.67