UNPKG

@resk/core

Version:

An innovative TypeScript framework that empowers developers to build applications with a fully decorator-based architecture for efficient resource management. By combining the power of decorators with a resource-oriented design, DecorRes enhances code cla

36 lines (35 loc) 1.85 kB
import { ICurrency } from "./types"; /** * @group Currency * Extends the default options with the provided ICurrency object to initialize default values. it sets up default values for currency formatting, merging them with any user-provided options. This ensures that all necessary settings are available for the formatting process. * * @param options The ICurrency object to merge with the default options. * @returns The merged ICurrency object with default values. */ declare function prepareOptions(options?: ICurrency): ICurrency; declare const _default: { parse: (value: any, decimalSeparator?: string) => number; session: { getFormat: (force?: boolean) => string; setFormat: (format: string) => any; setCurrency: (currency: ICurrency | string) => ICurrency; getCurrency: () => ICurrency; defaultCurrencyFormat: string; }; formatMoney: (number?: number, symbol?: ICurrency | string, decimalDigits?: number, thousandSeparator?: string, decimalSeparator?: string, format?: string) => string; currencies: import("./types").ICurrencies; isValidCurrency: (obj: any) => obj is ICurrency; formatNumber: (number: number, optionsOrDecimalDigits?: ICurrency | number, thousandSeparator?: string, decimalSeparator?: string) => string; formatMoneyAsObject: (number?: number, symbol?: ICurrency | string, decimalDigits?: number, thousandSeparator?: string, decimalSeparator?: string, format?: string) => ICurrency & { formattedValue: string; formattedNumber: string; usedFormat: string; result: string; }; unformat: (value: any, decimalSeparator?: string) => number; toFixed: (value: number, decimalDigits?: number) => string; formatDescription: string; prepareOptions: typeof prepareOptions; }; export default _default;