validify-string
Version:
Ensure accurate and secure input with our reliable string validation library.
38 lines (37 loc) • 2.38 kB
TypeScript
export declare const isIdentical: (strOne: string, strTwo: string) => boolean;
export declare const isAlpha: (str: string) => boolean;
export declare const isEmpty: (value: string) => boolean;
export declare const isAlphaNumeric: (str: string) => boolean;
export declare const isValidEmail: (email: string) => boolean;
export declare const countWords: (str: string) => number;
export declare const isAvailable: (str: string, word: string) => boolean;
export declare const countOccurrences: (str: string, word: string) => number;
export declare const isPasswordStrong: (password: string) => boolean;
export declare const isURL: (str: string) => boolean;
export declare const isValidPhone: (num: string) => boolean;
export declare const isIP: (ip: string) => boolean;
export declare const isUppercase: (str: string) => boolean;
export declare const isLowercase: (str: string) => boolean;
export declare const isPalindrome: (str: string) => boolean;
export declare const isValidDate: (dateString: string) => boolean;
export declare const isValidCardNumber: (num: string) => boolean;
export declare const isAlphanumeric: (str: string) => boolean;
export declare const isHash: (str: string) => boolean;
export declare const isHexadecimal: (str: string) => boolean;
export declare const isASCII: (str: string, extended?: string[]) => boolean;
export declare const isHexColor: (str: string) => boolean;
export declare const isJSON: (str: string) => boolean;
export declare const isJWT: (str: string) => boolean;
export declare const trimLeft: (str: string, chars: string) => string;
export declare const trimRight: (str: string, chars: string) => string;
export declare const trimBoth: (str: string, chars: string) => string;
export declare const encrypt: (str: string) => string;
export declare const decrypt: (toDecode: string) => string;
export declare const getAlphaNumString: (length: number) => string;
export declare const getLeftSubstring: (inputString: string, n: number) => string;
export declare function addUnderscore(inputString: string): string;
export declare function removeSpace(inputString: string): string;
export declare function removeUnderscore(inputString: string): string;
export declare const removeNumber: (str: string) => string;
export declare const addFullstop: (str: string) => string;
export declare const generateRandomString: (length: number) => string;