astw
walk the ast
This module is a faster version of
falafel
that only does ast walking and .parent
tracking, not source transforms.
example
var astw = ;var deparse = generate;var walk = ;;
methods
var astw =
var walk = astw(src, opts={})
Return a walk()
function from the source string or ast object src
.
Optionally:
opts.ecmaVersion
- default: 8
walk(cb)
Walk the nodes in the ast with cb(node)
where node
is each element in the
ast from esprima but with an additional .parent
reference to the parent node.
install
With npm do:
npm install astw
license
MIT