@cobuildlab/8base-chat
Version:
Chat component that uses 8base
21 lines (20 loc) • 695 B
TypeScript
/**
* Trims empty lines.
* @param text
* @param moreThan - specifies when to trim empty lines.
* For example, if there are more empty lines in a row than [moreThan]
* then it trims
*/
export declare function trimEmptyLines(text: string, moreThan: number): string;
/**
* Converts first letter to upper case, e.g. hello -> Hello
* @param str
*/
export declare function capitalize(str: string): string;
/**
* Returns all results matching a string against regular expression
* @param str
* @param regex
*/
export declare function matchAll(str: string, regex: RegExp): RegExpExecArray[];
export declare function hasHttpProtocol(url: string): boolean;