Appearance
TraversalOptions
Type: object
Properties
- directed(optional)
boolean[=false]Indicates if the graph should be considered as directed. - onEdge(optional)
(edge: Edge<ED, ND>) => void | booleanEdge callback. Called for each edge in the traversal. If you returnfalse, the edge will not be followed. - onNode
(node: Node<ND, ED>) => void | booleanNode callback. Called for each node in the traversal. If you returntrue, the traversal is stopped, understanding that you have found what you were looking for. - root
Node<ND,ED>|NodeIdTraversal root - the node from which the traversal should start.