/** * Format numbers into neat and formatted strings for people */ export declare function formatNumber(number: number, options?: { decimals?: number; locale?: string; }): string; /** * Format numbers into local currency with extra smarts */ export declare function formatCurrency(number: number, options?: { decimals?: number; locale?: string; }): string; /** * Format numbers into valuations displayed in thousands, millions or billions */ export declare function formatValuation(number: number, options?: { decimals?: number; locale?: string; currency?: string; }): string; /** * Format a number into a your unit of choice */ export declare function formatUnit(number: number, options: { unit: string; decimals?: number; unitDisplay?: 'short' | 'long'; locale?: string; }): string; /** * Format a number into a percentage */ export declare function formatPercentage(number: number, options?: { decimals?: number; locale?: string; }): string; /** * Collapses two dates (or timestamps) into a human-readable string * @info Time is optional and will only be shown if day, month and year are the same */ export declare function formatCombinedDates(from: Date | string | number, to: Date | string | number, options?: { locale?: string; format?: 'short' | 'long'; timeZone?: string; }): string; /** * Format time into a human-readable string */ export declare function formatDurationLabels(seconds: number, options?: { labels?: 'short' | 'long'; round?: boolean; decimals?: number; }): string; /** * Format time into duration 00:00:00 */ export declare function formatDurationNumbers(seconds: number): string; /** * Format and auto calculate file size into human-readable string */ export declare function formatFileSize(number: number, options?: { decimals?: number; inputUnit?: string; outputUnit?: string; unitDisplay?: 'short' | 'long'; locale?: string; }): string; /** * Format and auto calculate length into human-readable string */ export declare function formatLength(number: number, options?: { decimals?: number; inputUnit?: string; outputUnit?: string; unitDisplay?: 'short' | 'long'; locale?: string; }): string; /** * Format and auto calculate temperature into human-readable string */ export declare function formatTemperature(number: number, options?: { decimals?: number; inputUnit?: string; outputUnit?: string; unitDisplay?: 'short' | 'long'; locale?: string; }): string; /** * Format numbers into words */ export declare function formatNumberToWords(number: number): string; /** * Formats content into paragraphs with a minimum number of characters per sentence and minimum number of sentences per paragraph * @info Use whitespace-pre-wrap to ensure the whitespace is preserved */ export declare function formatParagraphs(text: string, options?: { minSentenceCount?: number; minCharacterCount?: number; }): string; /** * Generate initials from any string while ignoring common titles */ export declare function formatInitials(text: string, options?: { length?: number; }): string; /** * Format Unix timestamp into a datetime string */ export declare function formatUnixTime(timestamp?: number): string; /** * Create a string of comma-separated values from an array, object, or string with an optional limit and conjunction */ export declare function formatList(items: string | object | string[], options?: { limit?: number; conjunction?: string; }): string; /** * Converts a string to title case following the Chicago Manual of Style rules. */ export declare function formatTitle(text: string): string; /** * Format a sentence case string */ export declare function formatSentenceCase(text: string): string; /** * Adds a space between the last two words in a string to prevent lonely words. * @info Remember `text-wrap: pretty` and `text-wrap: balance` are available for most browsers. */ export declare function formatTextWrap(text: string): string;