index.js
function padRight(x, padding) {
  if (x) {
    x += '';
  } else {
    x = '';
  }
  var buf = [];
  while (buf.length + x.length < padding) {
    buf.push('0');
  }
  return x + buf.join('');
}
function padRight(x, padding) {
  if (x) {
    x += '';
  } else {
    x = '';
  }
  var buf = [];
  while (buf.length + x.length < padding) {
    buf.push('0');
  }
  return x + buf.join('');
}
function padRight ( x , padding ) { if ( x ) { x += '' ; } else { x = '' ; } var buf = [ ] ; while ( buf . length + x . length < padding ) { buf . push ( '0' ) ; } return x + buf . join ( '' ) ; }
where x is the decimals part of the number
where x is the decimals part of the number