UNPKG

@churchapps/apphelper

Version:

Library of helper functions for React and NextJS ChurchApps

21 lines 1.14 kB
export declare class CurrencyHelper { static CACHE_KEY: string; static CACHE_EXPIRATION: number; static loadCurrency: () => Promise<any>; static formatCurrency(amount: number): string; static formatCurrencyWithLocale(amount: number, currency?: string, fractionDigits?: number): string; static getCurrencySymbol(currency?: string): any; private static getLocaleForCurrency; static getExchangeRates(baseCurrency: string): Promise<Record<string, number>>; static convertDonation(donation: { currency: string; amount: number; }, rates: Record<string, number>, targetCurrency: string): string; static convertDonationTotals(donations: { currency: string; amount: number; }[], rates: Record<string, number>, targetCurrency: string): string; static convertAmount(amount: number, fromCurrency: string, toCurrency: string, rates: Record<string, number>): number; static convertAmountWithLocale(amount: number, donationCurrency: string, selectedCurrency: string, rates: Record<string, number>): Promise<string>; } //# sourceMappingURL=CurrencyHelper.d.ts.map