export function formatter(num) {
  if (isNaN(num) || !num) return 0;
  let n = num.toString().split('.');
  let number = n[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
  if (n[1]) number = number + '.' + n[1];
  return number;
}
