function format_money(n) {
  var buf = [], 
...

JavaScript Money formatting

by Tj Holowaychuk, November 25, 2009 23:05, 7 refactorings, tagged with formatting, money

Just needed to whip up a re...

F1e3ab214a976a39cfd713bc93deb10f Talk
function formatCurrency(num) {
    num = num.toString().replace(/\\$|\\,/g,'');
    if (isNaN(num)) num = '0';
...

JavaScript Format Currency

by slf, January 20, 2009 20:01, 7 refactorings, tagged with math, regex, formatting

During a code review we fou...

098e5c1a565b47e9860539fbebc3fa98 Talk