check-javascript-typescript-validations
Version:
To check all the validations related to javascript and typescript.
19 lines (18 loc) • 1.39 kB
TypeScript
import { DateDifferenceResult, MixedType } from "./types";
export declare function isValidEmail(email: string): boolean;
export declare function deepCloneArray(arr: MixedType[]): boolean;
export declare function variableIsEmpty(inputValue: any): boolean;
export declare function checkIsNumber(num: any): boolean;
export declare function isValidPhoneNumber(phoneNumber: string, requiredLength?: number): boolean;
export declare function isStrongPassword(password: string | number): boolean;
export declare function isValidDate(date: any): boolean;
export declare function removeDuplicatesFromArray<T>(array: T[]): T[];
export declare function sortArray<T extends number | string>(array: T[], ascending?: boolean): T[];
export declare function removeDuplicatesAndSortArray<T extends number | string>(array: T[], ascending?: boolean): T[];
export declare function compareTwoStrings(str1: string, str2: string): boolean;
export declare function differenceOfTwoDates(_startDate: (Date | string) | undefined, _endDate: string): DateDifferenceResult;
export declare const checkDataEmptyOrNot: (_data: any) => boolean;
export declare const validateUsername: (username: any, min?: number, max?: number) => boolean;
export declare const validateURL: (url: any) => boolean;
export declare const validateCreditCard: (number: any) => boolean;
export declare const validateIndianPAN: (pan: any) => boolean;