Add a listener to a path location. Listener should be unique per path
location, and calling twice with the same segments and listener value has no
effect. Unlike EventEmitter, listener may be any type of value
Remove the reference to this node from its parent so that it can be garbage
collected. This is called internally when all listeners to a node
are removed
Returns void
getAffectedListeners
getAffectedListeners(segments): any[]
Return an array with each of the listeners that may be affected by a change
to segments. These are:
Listeners to each node from the root to the node for segments
Construct a tree root when invoked without any arguments. Children nodes are constructred internally as needed on calls to addListener()
Param: parent
Param: segment