mdast utility to extract plain text content

JSON →
library 4.0.0 ·javascript
verified May 27, 2026

mdast-util-to-string is a focused utility within the unified ecosystem designed to extract the plain text content from an mdast (Markdown Abstract Syntax Tree) node or a list of nodes. It is currently stable at version 4.0.0. The project maintains compatibility with maintained versions of Node.js, typically releasing new major versions when older Node.js versions become unmaintained, which often includes breaking changes like switching to ESM or dropping specific API support. This package prioritizes text extraction over full markdown serialization, differentiating itself from `mdast-util-to-markdown`. It's particularly useful for scenarios like generating excerpts, search indexing, or displaying a node's textual content without its formatting, similar to `hast-util-to-string` for hast trees. It ships with full TypeScript support.

total hits 17
actors 9 distinct systems
last hit 4d ago Bingbot
MetaBot
4
GPTBot
2
Script
1
ClaudeBot
1
ChatGPT-User
1
Search engines
2

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇺🇦 Ukraine · 🇩🇪 Germany · 🇫🇷 France