You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given a tree, return a tree of the same structure made up of the objects returned by the callback which is executed at each node. If, however, at a given node the callback returns a falsy value, then the current node and all of its descendents will be pruned from the output tree.
Similar to Array.filter
Example : node.filter(function (node, parent_node, index, root_node) {/*SOMETHING*/})
NOTE : this is closely linked to this existing issue : #22
The text was updated successfully, but these errors were encountered:
A function pruneWhen can additionally allow to remove part of the tree, based on a predicate. This is another indirect way to implement stopping conditions (if a part of the tree is removed, it can be traversed).
Given a tree, return a tree of the same structure made up of the objects returned by the callback which is executed at each node. If, however, at a given node the callback returns a falsy value, then the current node and all of its descendents will be pruned from the output tree.
Similar to
Array.filter
Example :
node.filter(function (node, parent_node, index, root_node) {/*SOMETHING*/})
NOTE : this is closely linked to this existing issue : #22
The text was updated successfully, but these errors were encountered: