extract function
This commit is contained in:
1 parent
90558a3a28
commit
d596c31353
1 file changed
+7
@@ -0,0 +1,7 @@
|
|||||||
|
export function formatCurrency(value: number) {
|
||||||
|
if (isNaN(value)) {
|
||||||
|
return "";
|
||||||
|
} else {
|
||||||
|
return value.toFixed(2).replace(/\.00$/, '');
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user