uno-js
Version:
JS/TS common used functions, zero dependencies
19 lines (18 loc) • 654 B
TypeScript
export type FormatTypes = 'money' | 'percentage' | 'date' | 'decimal' | 'number' | 'days' | 'months';
export declare const formatter: (data: unknown, format?: FormatTypes, options?: {
keepFormat?: boolean;
decimals?: number;
nullValue?: string;
ignoreUndefined?: boolean;
locale?: string;
currency?: string;
showCurrency?: boolean;
}) => string | undefined;
export declare const toMoney: (data: unknown, options?: {
locale?: string;
currency?: string;
showCurrency?: boolean;
}) => string | undefined;
export declare const toPercentage: (data: unknown, options?: {
decimals?: number;
}) => string | undefined;