Visitor

Visitor

A set of Query objects and a callback to be called on nodes that match them.

Constructor

new Visitor(…query, callback)

Source:
Parameters:
Name Type Attributes Description
query QueryLike <repeatable>

one or more QueryLike objects to match against nodes

callback eachNode

called on nodes matching any of the visitor's queries