formatAmounts wip
This commit is contained in:
parent
969a389836
commit
b3b4887fdb
|
@ -0,0 +1,10 @@
|
|||
// @flow
|
||||
export const formatAmount = (number: string | number) => {
|
||||
let numberFloat = parseFloat(number)
|
||||
|
||||
if (numberFloat < 999.999999) {
|
||||
numberFloat = numberFloat.toFixed(2).toLocaleString()
|
||||
}
|
||||
|
||||
return numberFloat
|
||||
}
|
Loading…
Reference in New Issue