mdast-util-assert: Markdown Abstract Syntax Tree Assertion Utility
JSON →mdast-util-assert is a focused utility from the unified collective designed to validate the structure and properties of mdast (Markdown Abstract Syntax Tree) nodes. It provides functions to assert that a given object conforms to the expected shape of mdast nodes, including parent, literal, and void nodes. This package is particularly useful within API contexts where specific node types are expected, ensuring data integrity and preventing unexpected runtime errors. The current stable version is 5.0.0, which requires Node.js 16+ and is exclusively an ES Module (ESM). Release cadence generally follows semver, with major versions introducing breaking changes related to Node.js compatibility or module systems, while minor versions address bug fixes and documentation. Its key differentiator is its specialization for mdast nodes, building upon and re-exporting parts of the more general `unist-util-assert` for universal syntax trees.
Traffic · last 30 days
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇺🇦 Ukraine · 🇫🇷 France · 🇩🇪 Germany