Skip to content

typedoc-vitepress-theme-example / utilities / formatCurrency

formatCurrency()

ts
formatCurrency(amount, currencyCode): string

Function to format a number as currency.

Parameters

amount: number

The amount to be formatted.

currencyCode: string

The currency code (e.g., USD, EUR).

Returns

string

The formatted currency string.