build/lib/bundle.js
function visit(rootNodes, graph) {
    const result = {};
    const queue = rootNodes;
    rootNodes.forEach((node) => {
        result[node] = true;
    });
    while (queue.length > 0) {
        const el = queue.shift();
        const myEdges = graph[el] || [];
        myEdges.forEach((toNode) => {
            if (!result[toNode]) {
                result[toNode] = true;
                queue.push(toNode);
            }
        });
    }
    return result;
}
function visit(rootNodes, graph) {
    const result = {};
    const queue = rootNodes;
    rootNodes.forEach((node) => {
        result[node] = true;
    });
    while (queue.length > 0) {
        const el = queue.shift();
        const myEdges = graph[el] || [];
        myEdges.forEach((toNode) => {
            if (!result[toNode]) {
                result[toNode] = true;
                queue.push(toNode);
            }
        });
    }
    return result;
}
function visit ( rootNodes , graph ) { const result = { } ; const queue = rootNodes ; rootNodes . forEach ( ( node ) => { result [ node ] = true ; } ) ; while ( queue . length > 0 ) { const el = queue . shift ( ) ; const myEdges = graph [ el ] || [ ] ; myEdges . forEach ( ( toNode ) => { if ( ! result [ toNode ] ) { result [ toNode ] = true ; queue . push ( toNode ) ; } } ) ; } return result ; }
Return a set of reachable nodes in `graph` starting from `rootNodes`
Return a set of reachable nodes in graph starting from rootNodes