packages/plugin/index.js
function transitiveClosure(nodeLabels, graph) {
  let madeProgress = false;
  do {
    madeProgress = false;
    for (const [ src, values ] of Array.from(nodeLabels.entries())) {
      const targets = graph[src];
      if (targets) {
        for (const target of targets) {
          for (const value of values) {
            madeProgress = multiMapSet(nodeLabels, target, value) || madeProgress;
          }
        }
      }
    }
  } while (madeProgress);
}
function transitiveClosure(nodeLabels, graph) {
  let madeProgress = false;
  do {
    madeProgress = false;
    for (const [ src, values ] of Array.from(nodeLabels.entries())) {
      const targets = graph[src];
      if (targets) {
        for (const target of targets) {
          for (const value of values) {
            madeProgress = multiMapSet(nodeLabels, target, value) || madeProgress;
          }
        }
      }
    }
  } while (madeProgress);
}
function transitiveClosure ( nodeLabels , graph ) { let madeProgress = false ; do { madeProgress = false ; for ( const [ src , values ] of Array . from ( nodeLabels . entries ( ) ) ) { const targets = graph [ src ] ; if ( targets ) { for ( const target of targets ) { for ( const value of values ) { madeProgress = multiMapSet ( nodeLabels , target , value ) || madeProgress ; } } } } } while ( madeProgress ) ; }
Given a set of graph nodes to labels, propagates labels to
across edges.

@param nodeLabels a Map of nodes to labels.  Modified in place.
@param graph an adjacency table such that graph[src] is a series of targets,
nodes adjacent to src.
Given a set of graph nodes to labels propagates labels to across edges .