From b1600adec47a04f60e1da07d94a3ed3906ff5aee Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Thu, 14 Jun 2018 16:44:21 -0400 Subject: starter files --- frontend/lib/formatMoney.js | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 frontend/lib/formatMoney.js (limited to 'frontend/lib/formatMoney.js') diff --git a/frontend/lib/formatMoney.js b/frontend/lib/formatMoney.js deleted file mode 100644 index c001aee..0000000 --- a/frontend/lib/formatMoney.js +++ /dev/null @@ -1,11 +0,0 @@ -export default function(amount) { - const options = { - style: 'currency', - currency: 'USD', - minimumFractionDigits: 2, - }; - // if its a whole, dollar amount, leave off the .00 - if (amount % 100 === 0) options.minimumFractionDigits = 0; - const formatter = new Intl.NumberFormat('en-US', options); - return formatter.format(amount / 100); -} -- cgit v1.3