hast-util-to-string is a utility that extracts the textual content from a Hast (Hypertext Abstract Syntax Tree) node. It traverses the tree, concatenating text nodes' values and ignoring other node types. This is useful for obtaining a plain text representation of HTML content represented as a Hast tree, often used in tasks like indexing, searching, or generating previews. The package provides a simple and efficient way to strip away the markup and focus solely on the textual information contained within the Hast structure.
hast-util-to-string has seen infrequent releases. Initial activity was in 2016-2017, with occasional releases through 2020. Version 2.0.0 was released in August 2021, and version 3.0.0 in August 2023 followed by 3.0.1 a year later. There have been no releases in 2025 as of September 11th.
Hast-util-to-string downloads surged in mid-2024, peaking in October at nearly 15 million. Numbers declined toward the end of 2024 before stabilizing around 9 million in early 2025. August 2025 saw a slight dip, and September 2025 downloads are incomplete, showing significantly lower numbers.