Traverse with aster.
aster-traverse as a development dependency:
npm install --save-dev aster-traverse
Then, add it to your build script:
var aster = ;var traverse = ;aster;
Handler functions to be executed on enter/leave of each node.
If set, result of
leave would be used as replacement for node.
If returned from handler, this node would be skipped from processing.
If returned from handler, breaks traversal completely.