Methods
(inner) deepGet(keys, childPathopt, notSetValueopt) → {inputFunction}
- Source:
Gets a specific node from the tree. When no childPath is provided then this is functionally equivalent to Immutable's getIn function.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
keys |
Array | List | An {Array} or {List} of keys used to identify a node. | ||
childPath |
Array | List |
<optional> |
null
|
An {Array} or {List} of the key path to each node's children. |
notSetValue |
<optional> |
null
|
A value to return when there is no node corresponding to keys |
Returns:
The node at the specified path of keys, or if no node exists then notSetValue will be returned
- Type
- inputFunction
(inner) deepGetChildren(keys, childPathopt, notSetValueopt) → {inputFunction}
- Source:
Gets the children of a specific node from the tree.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
keys |
Array | List | An {Array} or {List} of keys used to identify nested nodes. | ||
childPath |
Array | List |
<optional> |
null
|
An {Array} or {List} of the key path to each node's children. |
notSetValue |
<optional> |
null
|
A value to return when there is no node corresponding to keys, or if the node doesn't have any children |
Returns:
The children of the node at the specified path of keys, or if no node or children exist then notSetValue will be returned
- Type
- inputFunction