MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / formatCurrency

Function formatCurrency

console/src/utils/format.ts:116–126  ·  view source on GitHub ↗
(
  amount: number,
  additionalOptions: Intl.NumberFormatOptions & MissingNumberFormatOptions = {},
)

Source from the content-addressed store, hash-verified

114 * Format a number as USD.
115 */
116export function formatCurrency(
117 amount: number,
118 additionalOptions: Intl.NumberFormatOptions & MissingNumberFormatOptions = {},
119): string {
120 const formatter = Intl.NumberFormat("default", {
121 style: "currency",
122 currency: "USD",
123 ...additionalOptions,
124 });
125 return formatter.format(amount);
126}
127
128function roundIntervalValue(
129 valueToRound: number,

Callers 8

ChartPanelFunction · 0.90
ResourceRowFunction · 0.90
ResourceGroupFunction · 0.90
InvoiceTableFunction · 0.90
UsagePage.test.tsxFile · 0.90
UpgradedPlanDetailsFunction · 0.90
DailyUsageChartTooltipFunction · 0.90
DailyUsageChartGraphFunction · 0.90

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected