@nkhind/vivawallet-sdk
Version:
Non-Official VivaWallet API SDK
30 lines (29 loc) • 1.41 kB
TypeScript
/**
* Make an uuid V4
*/
export declare function makeUuid(): string;
export declare function isDev(): boolean;
export declare function validStringLength(str: string, min: number, max: number): boolean;
export declare function isNumber(item: any): item is number;
/**
* Check if item is a valid number between min and max
*/
export declare function validNumber(item: any, min: number, max: number): item is number;
export declare function validPassword(password: string): boolean;
export declare function validEmail(email: string): boolean;
export declare function isEgal(item1: any, item2: any): boolean;
export declare function isInArray(item: any, array: any[]): boolean;
export declare function itemsIsInArray(items: any[], array: any[]): boolean;
export declare function isEmpty(item: any): boolean;
export declare function objArrayToObj(array: Record<string, any>[] | null | undefined, key: string): Record<string, any>;
export declare function isValidJson(str: string): boolean;
export declare function capitalize(str: string): string;
/**
* Replace all `search` by `replace` in `str`
*/
export declare function replaceAll(str: string, search: string, replace: string): string;
/**
* Replace all `{{keys}}` by values in `str`
*/
export declare function replaceKeyByValue(str: string, datas: Record<string, any>): string;
export declare function querifyDatas(datas: Record<string, any>): string;