Skip to content

Instantly share code, notes, and snippets.

@1mehdifaraji
Created November 11, 2023 03:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 1mehdifaraji/f2333b28d93d53dc15fdaa6c4cd23e94 to your computer and use it in GitHub Desktop.
Save 1mehdifaraji/f2333b28d93d53dc15fdaa6c4cd23e94 to your computer and use it in GitHub Desktop.
Persian price toLocaleString
export const toLocaleString = (
num: number,
options?: Intl.NumberFormatOptions
) => num.toLocaleString("fa-IR", options).replace(/\٬/g, ",");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment