There was an error while loading. Please reload this page.
Call estraverse.traverse or estraverse.replace with an object that has the following methods:
estraverse.traverse
estraverse.replace
enter
leave
Both of these methods have the following signature: function(node, parent). Note that parent can be null in some situations.
function(node, parent)
parent
The enter function may control the traversal by returning the following values (or calling corresponding methods):
estraverse.VisitorOption.Skip
this.skip()
estraverse.VisitorOption.Break
this.break()
The leave function can also control the traversal by returning the following values:
In estraverse.replace you can also return one of:
new node to replace old one with
estraverse.VisitorOption.Remove / this.remove() - Removes current node from parent array or replaces with null if not element of array.
estraverse.VisitorOption.Remove
this.remove()
null