html-truncate-ts
Version:
TypeScript library for truncating HTML strings while preserving HTML tags and structure
13 lines • 628 B
TypeScript
export declare const EMPTY_OBJECT: {};
export declare const EMPTY_STRING = "";
export declare const DEFAULT_TRUNCATE_SYMBOL = "...";
export declare const EXCLUDE_TAGS: string[];
export declare const KEY_VALUE_REGEX = "([\\w|-]+\\s*=\\s*\"[^\"]*\"\\s*)*";
export declare const IS_CLOSE_REGEX = "\\s*\\/?\\s*";
export declare const CLOSE_REGEX = "\\s*\\/\\s*";
export declare const SELF_CLOSE_REGEX: RegExp;
export declare const HTML_TAG_REGEX: RegExp;
export declare const URL_REGEX: RegExp;
export declare const IMAGE_TAG_REGEX: RegExp;
export declare const WORD_BREAK_REGEX: RegExp;
//# sourceMappingURL=truncate.const.d.ts.map