@osaedasia/oresume
Version:
A user-friendly library for generating complete Single Page Applications (SPAs)
19 lines (18 loc) • 957 B
TypeScript
/**
* A utility class providing helper methods for manipulating and working with DOM structures.
*/
export declare class DomHelper {
/**
* Creates a regular expression pattern to match an attribute with a specific value.
* @param {RegExp} value The regular expression pattern to match the attribute value.
* @returns {RegExp} A regular expression pattern to match attributes in the format `key="value"` where the value matches the provided pattern.
*/
static createAttributeValuePattern(value: RegExp): RegExp;
/**
* Wraps HTML content in a single container element if necessary.
* @param {string} html The HTML string to process.
* @returns {DocumentFragment} A DocumentFragment containing either the original content if it has exactly one root element,
* or the content wrapped in a div if it has multiple or no root elements.
*/
static wrapHtmlInSingleDiv(html: string): DocumentFragment;
}