Create a new RadixTree.
the [key, value] pairs with which to initialize the radix tree
Delete the k,v pair for the given key k from the radix tree.
the key to delete from the radix tree
true if success, false if k not found
Return the value associated to a key in the RadixTree.
the key to look for. must have length > 0
the keyMatch for the given key k. if k not found, return undefined
Get the KeyMatch object for every [k,v] pair where k.startsWith(prefix).
only return KeyMatch for keys k where k.startsWith(prefix)
configuration for behavior of this function
include keyMatch objects for all nodes, not just those having values
prune nodes from traversal
the type of tree traversal to do, must be in constants.SEARCH_TYPES
For a given prefix, find the shallowest node in the radix tree whose key either matches the prefix exactly or is the shortest matching key that is longer than the prefix.
For example, if "ab" and "abcd" are inserted into the radix tree, the search root of the prefix "abc" would be the node matching "abcd". The "abcd" node would be the root of the subtree containing all nodes whose keys start with "abc", since there were no other keys that start with "abc" other than "abcd" and its children.
the prefix for which to find the searchRoot
the SearchRootMatch if one is found
Add a [key, value] pair to the RadixTree.
the key to insert into the radix tree. must have length > 0
the value to associate to the key in the radix tree
Generated using TypeDoc
The RadixTree class