NFodrea
4/25/2017 - 10:40 PM

ES6 price format

ES6 price format

function formatPrice(cents) {
  return `$${(cents / 100).toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g, ',')}`;
}