type Locale = | 'en-US' | 'en-GB' | 'en-CA' | 'en-AU' | 'ja-JP' | 'ko-KR' | 'de-DE' | 'fr-FR' | 'es-ES' | 'it-IT' | 'pt-PT' | 'pt-BR' | 'nl-NL' | 'pl-PL' | 'ru-RU' | 'tr-TR' | 'ar-SA' | 'cs-CZ' | 'da-DK' | 'fi-FI' | 'el-GR' | 'he-IL' | 'hu-HU' | 'id-ID' | 'ms-MY' | 'no-NO' | 'ro-RO' | 'sk-SK' | 'sv-SE' | 'th-TH' | 'vi-VN' | 'uk-UA' | 'hi-IN' | 'bn-IN' | 'pa-IN' | 'ta-IN' | 'te-IN' | 'ml-IN' | 'mr-IN' | 'ur-IN' | 'or-IN' | 'gu-IN' | 'kn-IN' | 'as-IN' | 'ne-NP' | 'si-LK' | 'lo-LA' | 'my-MM' | 'km-KH' | 'ko-KP' | 'zh-CN' | 'zh-TW' | 'zh-HK' | 'zh-MO' | 'zh-SG' | (string & NonNullable); export interface FormatCurrencyOptions extends FormatRoundedOptions { /** * @default ',' */ delimiter?: string; /** * @default '%u%n' */ format?: string; /** * @default '-%u%n' */ negativeFormat?: string; /** * Unit of the currency, depending on the locale by default. * @example '$' */ unit?: string; /** * @default 2 */ precision?: number; locale?: Locale; } export declare const formatCurrency: ( n: number, options?: FormatCurrencyOptions, ) => string; export interface FormatDelimitedOptions { /** * @default '.' */ separator?: string; /** * @default ',' */ delimiter?: string; /** * @default 3 */ groupSize?: number; /** * Pattern used to match the number. * If provided, `groupSize` will be ignored. * @default /(\d)(?=(\d{})+(?!\d))/g */ pattern?: RegExp; } export declare const formatDelimited: ( n: number | string, options?: FormatDelimitedOptions, ) => string; export interface FormatHumanSizeOptions extends FormatRoundedOptions { /** * @default '' */ delimiter?: string; /** * @default '%n %u' */ format?: string; units?: { /** * Representation of the unit depending on the locale. * @example 'Bytes' */ byte: string; /** * Representation of the unit depending on the locale. * @example 'KB' */ kb: string; /** * Representation of the unit depending on the locale. * @example 'MB' */ mb: string; /** * Representation of the unit depending on the locale. * @example 'GB' */ gb: string; /** * Representation of the unit depending on the locale. * @example 'TB' */ tb: string; /** * Representation of the unit depending on the locale. * @example 'PB' */ pb: string; /** * Representation of the unit depending on the locale. * @example 'EB' */ eb: string; }; /** * @default true */ significant?: boolean; /** * @default true */ stripInsignificantZeros?: boolean; locale?: Locale; } export declare const formatHumanSize: ( n: number, options?: FormatHumanSizeOptions, ) => string; export interface FormatPercentageOptions extends FormatRoundedOptions { /** * @default '%n%' */ format?: string; /** * @default '' */ delimiter?: string; } export declare const formatPercentage: ( n: number, options?: FormatPercentageOptions, ) => string; export interface FormatPhoneOptions { areaCode?: boolean; countryCode?: string | number; delimiter?: string; extension?: string | number; pattern?: RegExp; locale?: Locale; } export interface FormatRoundedOptions extends FormatDelimitedOptions { /** * @default '' */ delimiter?: string; /** * @default 3 */ precision?: number; /** * @default false */ significant?: boolean; /** * @default false */ stripInsignificantZeros?: boolean; /** * @default 'half_up' */ roundMode?: | 'up' | 'down' | 'half_up' | 'half_down' | 'half_even' | 'ceil' | 'floor'; } export declare const formatRounded: ( n: number, options?: FormatRoundedOptions, ) => string; declare const toFormattedString: { (n: number, format: 'currency', options?: FormatCurrencyOptions): string; (n: number, format: 'delimited', options?: FormatDelimitedOptions): string; (n: number, format: 'human-size', options?: FormatHumanSizeOptions): string; (n: number, format: 'percentage', options?: FormatPercentageOptions): string; (n: number, format: 'phone', options?: FormatPhoneOptions): string; (n: number, format: 'rounded', options?: FormatRoundedOptions): string; (n: number, format: string, options?: object): string; }; export default toFormattedString; //# sourceMappingURL=toFormattedString.d.ts.map