UNPKG

dff-util

Version:

DesignForFeature Utilities

23 lines (22 loc) 1.56 kB
import { LangCountryType } from "./const-type"; export declare const AppRandomString: (length: number, charset: string) => string; export declare const AppUniqueCode: () => string; export declare const AppCodeByType: (name: string, type?: null) => string; export declare const AppCode: (name: string) => string | null; export declare const AppDaysBack: (date: Date, backValue: number, isDays?: boolean) => Date; export declare const AppAddDays: (date: Date, addDays: number, isDays?: boolean) => Date; export declare const AppUUID4: () => string; export declare const TruncateText: (input: string, maxLength: number) => string; export declare const DateTime24HrFormat: (time: string) => string; export declare const DateTime12HrFormat: (timestamp: Date, showDate?: boolean, showTime?: boolean) => string; export declare const DateAndTime: (dateString: string, timeString: string) => Date | null; export declare const TimeAgo: (date: Date) => string; export declare const LangText: (data: string, source: string, target: string) => Promise<any>; export declare const LangCountryCode: (lang: string) => LangCountryType; export declare const CurrencyConvert: (from: string, to: string) => Promise<number>; export declare function EncodeBase64(input: string): string; export declare function DecodeBase64(encoded: string): string; export declare function EncodeURL(input: string): string; export declare function DecodeURL(input: string): string; export declare function SafeEncode(input: string): string; export declare function SafeDecode(encoded: string): string;