@kbob/tlinq
Version:
Linq type extensions for javascript objects
37 lines (36 loc) • 1.17 kB
TypeScript
declare global {
interface String {
isNullOrWhiteSpace(): boolean;
toLower(): string;
toUpper(): string;
capitalize(): string;
startsWith(searchString: string): boolean;
endsWith(searchString: string): boolean;
contains(searchString: string, ignoreCase: boolean): any;
isEmail(): boolean;
/**
* Checks if given string is a valid GUID
*/
isGUId(): boolean;
/**
* Trim the string
* @param length length or limit to trim the given string
*/
trimExcess(length: number): string;
stripTags(): string;
stripNumeric(): string;
stripNonNumeric(): string;
isAlphaNumeric(): boolean;
isAlpha(): boolean;
isLowerCase(): boolean;
isUpperCase(): boolean;
toBoolean(): boolean;
toFloat(precision: number): number;
toInt(): number;
takeFrom(startIndex: number): string;
takeTo(endIndex: number): string;
countOf(searchString: string): number;
in(params: any): boolean;
}
}
export {};