Files
certd/packages/core/basic/src/utils/util.amount.ts
2024-12-26 01:01:28 +08:00

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));
},
};