Initial RTL storefront with header, slider, product sections, and local image assets. Co-authored-by: Cursor <cursoragent@cursor.com>
8 lines
240 B
TypeScript
8 lines
240 B
TypeScript
export function faDigits(value: string | number) {
|
|
return String(value).replace(/\d/g, (digit) => "۰۱۲۳۴۵۶۷۸۹"[Number(digit)]);
|
|
}
|
|
|
|
export function formatPrice(value: number) {
|
|
return faDigits(value.toLocaleString("en-US"));
|
|
}
|