get

Methods

(inner) deepGet(nodePath, childPathopt, notSetValueopt) → {InputFunction}

Source:

Once fully applied, this returns 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
nodePath NodePath

A NodePath used to identify the node to return.

childPath ChildPath <optional>
null

An Array or List of keys indicating where to find each node's children from within each node.

notSetValue * <optional>
null

A value to return when there is no node corresponding to nodePath.

Returns:

A partially applied function which accepts a single tree Iterable. InputFunction will return the node at the specified nodePath, or if no node exists then notSetValue will be returned.

Type
InputFunction

(inner) deepGetChildren(nodePath, childPathopt, notSetValueopt) → {InputFunction}

Source:

Once fully applied, this returns the children of a specific node from the tree.

This is intended to be used with a childPath, but if no childPath is provided then this is functionally equivalent to Immutable's getIn() function or deepMap().

Parameters:
Name Type Attributes Default Description
nodePath NodePath

A NodePath used to identify the node to return.

childPath ChildPath <optional>
null

An Array or List of keys indicating where to find each node's children from within each node.

notSetValue * <optional>
null

A value to return when there is no node corresponding to nodePath, or if the node doesn't have any children.

Returns:

A partially applied function which accepts a single tree Iterable. InputFunction will return the children of the node at the specified nodePath, or if no node or children exist then notSetValue will be returned

Type
InputFunction