Lightweight AST traversal library for Babel ASTs, v3.0.1 (released 2023). Provides simple, ancestor, and recursive walk functions that are significantly faster than babel-traverse (~8-16x). Key differentiators: curried API (since v3) for improved TypeScript inference and caching of visitors; no union syntax support; designed for non-transformational walks where performance matters. Release cadence is irregular, with major breaking changes in v2 (rename from babylon-walk, dropped Node <10) and v3 (curried functions).
npm install babel-walkVerified import paths — ran on the pinned version, not inferred.
Parses Babel AST and uses simple walker with cached visitors; demonstrates curried API and state passing.
Change to walk.simple(visitors)(node, state) or destructure import { simple } and call simple(visitors)(node, state).Replace require('babylon-walk') with require('babel-walk') or import from 'babel-walk'.Use separate visitor functions for each node type or use an alias like Expression.
Always pass a state object (can be empty object {}) to ancestor walker to avoid confusing defaults.Use const { simple } = require('babel-walk'); then simple(visitors)(node, state);Run npm install babel-walk and ensure import path is 'babel-walk' not 'babylon-walk'.
Define separate visitors for each node type, or use a broader alias like Declaration.
No dependency data recorded yet.