How to use hast-util-from-dom - 1 common examples

To help you get started, we’ve selected a few hast-util-from-dom 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 rehypejs / rehype-dom / packages / rehype-dom-parse / src / index.js View on Github external
function parser(doc, file) {
    const create = settings.fragment == null || settings.fragment ? createFragment : createDocument;
    return fromDOM(create(String(file)));


hast utility to create a tree from the DOM

Latest version published 7 months ago

Package Health Score

67 / 100
Full package analysis

Popular hast-util-from-dom functions