{"library":"hast-util-to-html","type":"library","category":null,"description":"hast-util-to-html is a core utility within the unifiedjs ecosystem, designed to serialize a HAST (Hypertext Abstract Syntax Tree) into an HTML string. It is currently at version 9.0.5 and maintains an active release cadence, providing frequent patch updates and introducing major versions for significant breaking changes or feature additions. This utility is distinct from `rehype-stringify`, which acts as a higher-level wrapper for integrating with rehype plugins, while `hast-util-to-html` offers direct, granular control over the serialization process. Its primary differentiators include extensive options for configuring the output, enabling use cases from pretty-printing to minification, and its direct compatibility with HAST trees. It serves as the inverse operation to `hast-util-from-html`, providing a complete round-trip for HTML processing within the unifiedjs framework. The package adheres to modern JavaScript standards, being ESM-only since version 9.","language":"javascript","status":"active","version":"9.0.5","tags":["javascript","hast-util","hast","html","serialize","stringify","tostring","unist","utility","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install hast-util-to-html","imports":["import { toHtml } from 'hast-util-to-html';","import type { Options } from 'hast-util-to-html';","import {toHtml} from 'https://esm.sh/hast-util-to-html@9'"]},{"cmd":"yarn add hast-util-to-html","imports":[]},{"cmd":"pnpm add hast-util-to-html","imports":[]}],"homepage":null,"github":"https://github.com/syntax-tree/hast-util-to-html","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/hast-util-to-html","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-html/compatibility"}}