mirror of
https://github.com/certd/certd.git
synced 2026-04-18 16:40:54 +08:00
10 lines
211 B
TypeScript
10 lines
211 B
TypeScript
export const amountUtils = {
|
|
toCent(amount: number): number {
|
|
return parseInt((amount * 100).toFixed(0));
|
|
},
|
|
|
|
toYuan(amount: number): number {
|
|
return parseFloat((amount / 100).toFixed(2));
|
|
},
|
|
};
|