Methods
get(key) → {*}
Retrieve the data attached to a key.
Parameters:
Name | Type | Description |
---|---|---|
key |
* |
Returns:
- Type
- *
getNodeForKey(key, touchopt) → {TrieNode}
Retrieve the node instance that holds the key. If touch is set then missing nodes will be created. Guarantees that an instance will be returned. The implementation is structural, not recursive.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
key |
String | |||
touch |
Boolean |
<optional> |
false
|
Returns:
- Type
- TrieNode
put(key, value)
Put a value into the structure. Attach some data to it.
Parameters:
Name | Type | Description |
---|---|---|
key |
String | |
value |
* |