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 | boolean
Edge callback. Called for each edge in the traversal. If you returnfalse
, the edge will not be followed. - onNode
(node: Node<ND, ED>) => void | boolean
Node 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>|NodeId
Traversal root - the node from which the traversal should start.