summaryrefslogtreecommitdiffstats
path: root/frontend/lib/formatMoney.js
diff options
context:
space:
mode:
authorWes Bos <wesbos@gmail.com>2018-06-14 16:44:21 -0400
committerWes Bos <wesbos@gmail.com>2018-06-14 16:44:21 -0400
commitb1600adec47a04f60e1da07d94a3ed3906ff5aee (patch)
tree828f786da6806d7237ee5cbc5df61e552353b85b /frontend/lib/formatMoney.js
parenta95e08cd2dd5d7ec0a0412adae02515a5f9cec4f (diff)
starter files
Diffstat (limited to 'frontend/lib/formatMoney.js')
-rw-r--r--frontend/lib/formatMoney.js11
1 files changed, 0 insertions, 11 deletions
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);
-}