UNPKG

node-html-parser

Version:

A very fast HTML parser, generating a simplified DOM, with basic element query support.

13 lines (12 loc) 361 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const html_1 = require("./nodes/html"); /** * Parses HTML and returns a root element * Parse a chuck of HTML source. */ function valid(data, options = {}) { const stack = (0, html_1.base_parse)(data, options); return Boolean(stack.length === 1); } exports.default = valid;