index.js
function removeNode(node){
    
    // Remove incoming edges.
    Object.keys(edges).forEach(function (u){
      edges[u].forEach(function (v){
        if(v === node){
          removeEdge(u, v);
        }
      });
    });

    // Remove outgoing edges (and signal that the node no longer exists).
    delete edges[node];

    return graph;
  }
function removeNode(node){
    
    // Remove incoming edges.
    Object.keys(edges).forEach(function (u){
      edges[u].forEach(function (v){
        if(v === node){
          removeEdge(u, v);
        }
      });
    });

    // Remove outgoing edges (and signal that the node no longer exists).
    delete edges[node];

    return graph;
  }
function removeNode ( node ) { // Remove incoming edges. Object . keys ( edges ) . forEach ( function ( u ) { edges [ u ] . forEach ( function ( v ) { if ( v === node ) { removeEdge ( u , v ) ; } } ) ; } ) ; // Remove outgoing edges (and signal that the node no longer exists). delete edges [ node ] ; return graph ; }
Removes a node from the graph. Also removes incoming and outgoing edges.
Removes a node from the graph . Also removes incoming and outgoing edges .