Skip to content

Instantly share code, notes, and snippets.

@thegeorgenikhil
Created July 3, 2022 12:39
Show Gist options
  • Save thegeorgenikhil/d24905bdade3ea410be8b939ca4460a2 to your computer and use it in GitHub Desktop.
Save thegeorgenikhil/d24905bdade3ea410be8b939ca4460a2 to your computer and use it in GitHub Desktop.
Currency Formatter
const CURRENCY_FORMATTER = new Intl.NumberFormat(undefined, {
currency: "INR",
style: "currency",
});
export function formatCurrency(number: number) {
return CURRENCY_FORMATTER.format(number);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment