Unist Utility for Ancestral Node Traversal

JSON →
library 6.0.2 ·javascript
verified May 27, 2026

unist-util-visit-parents is a robust utility within the unist (Universal Syntax Tree) ecosystem designed for deeply traversing ASTs (Abstract Syntax Trees) while providing a full lineage of parent nodes for each visited node. This functionality is crucial for transformations or analyses that require contextual information about a node's position within the tree. The current stable version is 6.0.2, with active development evidenced by frequent minor and major releases, particularly focusing on TypeScript type improvements and ESM compatibility. It differentiates itself from `unist-util-visit` by offering an array of parent nodes, making it indispensable for scenarios where ancestral context is necessary, such as scope analysis or complex rewrite operations. The library is ESM-only and requires Node.js 16 or higher, adhering to modern JavaScript module standards.

total hits 18
actors 8 distinct systems
last hit 4d ago AhrefsBot
GPTBot
5
MetaBot
4
Script
1
ChatGPT-User
1
Search engines
2

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