UNPKG

@novastera-oss/currencies-info

Version:

A comprehensive library providing up-to-date currency data, including symbols, ISO codes, and country associations. Ideal for developers needing accurate and customizable currency information for global applications. Powered by Novastera.

39 lines (36 loc) 1.2 kB
/** * OptionType interface - Useful for dropdowns and autocomplete * @interface OptionType * @property {string} id - The unique identifier for the option. * @property {string} l - The label for the option. */ interface OptionType { id: string; l: string; } /** * CurrencyInfo interface - Useful for currency data * @interface CurrencyInfo * @property {string} s - The symbol for the currency. * @property {number} d - The decimal precision for the currency. */ interface CurrencyInfo { s: string; d: number; } /** * Currencies interface - Give all the informations about the currencies and their countries * @interface Currencies * @property {string[]} list - The list of currency codes. * @property {OptionType[]} options - The options for the currency. * @property {Record<string, CurrencyInfo>} currency - The currency data. * @property {Record<string, string[]>} country - The country data. */ interface Currencies { list: string[]; options: OptionType[]; currency: Record<string, CurrencyInfo>; country: Record<string, string[]>; } declare const CURRENCIES: Currencies; export { CURRENCIES, type Currencies, type CurrencyInfo, type OptionType };