UNPKG

html-ellipsis

Version:

truncates a html string without messing up the tags

11 lines 523 B
/** * Extracts <tag id="foo"> from a larger string. Assumes str[startIdx] === '<' */ export declare function extractTag(str: string, startIdx: number): string; /** Checks that <tag> is an end tag */ export declare function isEndTag(tag: string): boolean; /** Extracts tag from <tag id="foo"> */ export declare function extractTagName(tag: string): string; /** Checks that tagName is a void tag (it doesn't have an end tag) */ export declare function isVoidTag(tagName: string): boolean; //# sourceMappingURL=tags.d.ts.map