Yes that would be rad. Some working code based on the previous visit(callback, startNode), to test the API:
node[Symbol.iterator] = function*() {
const nodes = [];
visit.apply(quadtree, [
node => void (node.data && nodes.push(node)),
node
]);
yield* nodes;
};
Usage:
> for (const { data } of node) data.immediate = true;
(the actual implementation would not store the nodes but yield them immediately)