dbl-utils
Version:
Utilities for dbl, adba and others projects
17 lines (16 loc) • 613 B
TypeScript
type FormatType = 'number-compact' | 'numbercompact' | 'number' | 'currency' | 'dictionary' | 'date' | 'time' | 'date-time' | 'datetime';
interface FormatConfig {
format?: FormatType;
formatConf?: string | Intl.NumberFormatOptions;
context?: any;
currency?: string;
}
/**
* Formats a value based on the provided configuration.
*
* @param value - The value to format
* @param conf - Configuration options for formatting
* @returns The formatted value or the original value if the format is not specified
*/
export default function formatValue(value: any, conf: FormatConfig): any;
export {};