html-to-json-parser
Version:
This library converts HTML to JSON or JSON to HTML tree
10 lines (9 loc) • 415 B
TypeScript
import { JSONContent } from '../types';
/**
* Converts HTML Element or string to JSON
* @param element The HTML string or element to convert to JSON.
* @param json A boolean to indicate if the output should be a JSON string.
* @returns {Promise<JSONContent | string>}
*/
declare function HTMLParser(element: Element | string, json?: boolean): Promise<JSONContent | string>;
export default HTMLParser;