{"library":"hast-util-to-dom","type":"library","category":null,"description":"This package, `hast-util-to-dom`, serves as a utility for converting a `hast` (HTML Abstract Syntax Tree) into a browser-native DOM tree or a simulated DOM environment like `jsdom`. The current stable version is 4.0.1. The project generally follows Node.js maintenance cycles for compatibility, dropping support for unmaintained Node.js versions with major releases. It has a steady release cadence, with version 4.0.0 released recently to update dependencies and enforce modern JavaScript environments. Key differentiators include its tight integration within the unified ecosystem, providing a direct transformation path for HTML ASTs to DOM nodes. It supports client-side rendering directly into the browser's DOM, and also works in server-side contexts with DOM implementations like `jsdom`. It complements `hast-util-from-dom`, which performs the inverse operation, turning DOM trees into hast. Furthermore, `hast-util-to-dom` is utilized internally by `rehype-dom-stringify` for DOM-based HTML serialization. It is important to note that the library transitioned to being ESM-only since version 3.0.0 and requires Node.js 16 or newer as of version 4.0.0, which are significant compatibility considerations for integrators.","language":"javascript","status":"active","version":"4.0.1","tags":["javascript","dom","hast-util","hast","html","rehype","unist","utility","util","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install hast-util-to-dom","imports":["import { toDom } from 'hast-util-to-dom'","import type { AfterTransform } from 'hast-util-to-dom'","import type { Options } from 'hast-util-to-dom'"]},{"cmd":"yarn add hast-util-to-dom","imports":[]},{"cmd":"pnpm add hast-util-to-dom","imports":[]}],"homepage":null,"github":"https://github.com/syntax-tree/hast-util-to-dom","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/hast-util-to-dom","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/hast-util-to-dom/compatibility"}}