How to use the domhandler function in domhandler

To help you get started, we’ve selected a few domhandler examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github juffalow / pentest-tool-lite / src / functions / parseHtml.ts View on Github external
return new Promise((resolve, reject) => {
    const handler = new DomHandler((error, dom) => {
      resolve({
        html: dom,
        url: result.url,
      });
    });
    const parser = new Parser(handler, {lowerCaseAttributeNames: true});
    parser.write(result.body);
    parser.end();
  });
}

domhandler

Handler for htmlparser2 that turns pages into a dom

BSD-2-Clause
Latest version published 2 years ago

Package Health Score

78 / 100
Full package analysis