Hey Mike
Great work. For tree traversal it would be great to have a function that returns all nodes at a certain depth.
Example (taken from source code for leaves()):
export default function(depth) {
var nodes = [];
this.eachBefore(function(node) {
if (node.depth === depth) {
nodes.push(node);
}
});
return nodes;
}
kind regards Benjamin