Files
nguyencongpc_nextjs/src/lib/formatPrice.ts

5 lines
168 B
TypeScript
Raw Normal View History

2025-12-27 10:03:53 +07:00
export const formatCurrency = (value: number | string) => {
const num = typeof value === 'string' ? parseInt(value) : value;
return num.toLocaleString('vi-VN');
};