Files
nguyencongpc_nextjs/src/lib/formatPrice.ts
2025-12-27 10:03:53 +07:00

5 lines
168 B
TypeScript

export const formatCurrency = (value: number | string) => {
const num = typeof value === 'string' ? parseInt(value) : value;
return num.toLocaleString('vi-VN');
};