Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

currency format

/* https://www.npmjs.com/package/format-money-js */

const { FormatMoney } = require('format-money-js');

const fm = new FormatMoney({
  decimals: 2
});

console.log(fm.from(12345.67, { symbol: '$' })); // return string: $12,345.67
console.log(fm.un('€12,345;67')); // return number: 12345.67
 
PREVIOUS NEXT
Tagged: #currency #format
ADD COMMENT
Topic
Name
8+8 =