umbot
Version:
Universal bot(vk, telegram, viber) or skills for Yandex.Alisa, Маруся and sber
21 lines (20 loc) • 867 B
TypeScript
export type TPattern = string | readonly string[];
export interface ITextSimilarity {
status: boolean;
index: number | null;
percent: number;
text?: string | null;
}
export declare class Text {
private static readonly regexCache;
static resize(text: string | null, size?: number, isEllipsis?: boolean): string;
static isUrl(link: string): boolean;
static isSayTrue(text: string): boolean;
static isSayFalse(text: string): boolean;
private static isSayPattern;
static isSayText(find: TPattern, text: string, isPattern?: boolean): boolean;
private static getCachedRegex;
static getText(str: TPattern): string;
static getEnding(num: number, titles: readonly string[], index?: number | null): string | null;
static textSimilarity(origText: string, compareText: TPattern, threshold?: number): ITextSimilarity;
}