@lion/ui
Version:
A package of extendable web components
15 lines • 801 B
TypeScript
/**
* Uses `parseNumber()` to parses a number string and returns the best possible javascript number.
* Rounds up the number with the correct amount of decimals according to the currency.
*
* @example
* parseAmount('1,234.56', {currency: 'EUR'}); => 1234.56
* parseAmount('1,234.56', {currency: 'JPY'}); => 1235
* parseAmount('1,234.56', {currency: 'JOD'}); => 1234.560
*
* @param {string} value Number to be parsed
* @param {FormatNumberOptions} [givenOptions] Locale Options
*/
export function parseAmount(value: string, givenOptions?: import("../../localize/types/LocalizeMixinTypes.js").FormatNumberOptions | undefined): number | undefined;
export type FormatNumberOptions = import('../../localize/types/LocalizeMixinTypes.js').FormatNumberOptions;
//# sourceMappingURL=parsers.d.ts.map