basant307/AI_Governance_Project
048
1export default function*() {2 var node = this, current, next = [node], children, i, n;3 do {4 current = next.reverse(), next = [];5 while (node = current.pop()) {6 yield node;7 if (children = node.children) {8 for (i = 0, n = children.length; i < n; ++i) {9 next.push(children[i]);10 }11 }12 }13 } while (next.length);14}15 