HAST Heading Rank Utility

JSON →
library 3.0.0 ·javascript
verified May 27, 2026

hast-util-heading-rank is a specialized utility within the unified ecosystem, designed to determine the rank (or level) of HTML heading elements (h1-h6) within a HAST (Hypertext Abstract Syntax Tree) node. The current stable version is 3.0.0. As part of the unified collective, it maintains a consistent release cadence, with major versions often dropping support for unmaintained Node.js versions and introducing breaking changes, particularly concerning module systems and type definitions. Its primary differentiator is its focused role in parsing and analyzing HAST structures, providing a clean, immutable API to query heading levels without altering the tree. This contrasts with related utilities like `hast-util-shift-heading`, which is designed to modify heading ranks, or `hast-util-heading`, which merely checks if a node is a heading.

total hits 16
actors 8 distinct systems
last hit 3d ago AhrefsBot
MetaBot
4
GPTBot
2
Script
1
ClaudeBot
1
Search engines
2

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