Skip to content

basalt / subscriptions/src / formatMoney

Function: formatMoney() ​

> formatMoney(minor, currency, locale?): string

Defined in: subscriptions/src/money.ts:53

Format a minor-unit amount for display. Falls back to a plain string if Intl lacks the currency.

Parameters ​

minor ​

number

currency ​

string

locale? ​

string = 'en-US'

Returns ​

string

Released under the MIT License.