removeNode(nodeId) {
    const node = this.findNode(nodeId);
    if (!node) {
      log.warn(`Unable to remove node ${nodeId} - doesn't exist`)();
      return;
    }
    // remove all edges connect to this node from map
    node.getConnectedEdges().forEach(e => {
      delete this._edgeMap[e.getId()];
    });
    // remove the node from map
    delete this._nodeMap[nodeId];
    this._touchLastUpdate();
  }
/**
   * Remove a node from the graph by node ID
   * @param  {String|Number} nodeId - the ID of the target node.
   */
Remove a node from the graph by node ID
@param  {String|Number} nodeId - the ID of the target node.
Remove a node from the graph by node ID @param { String|Number } nodeId - the ID of the target node .
removeNode(nodeId) {
    const node = this.findNode(nodeId);
    if (!node) {
      log.warn(`Unable to remove node ${nodeId} - doesn't exist`)();
      return;
    }
    node.getConnectedEdges().forEach(e => {
      delete this._edgeMap[e.getId()];
    });
    delete this._nodeMap[nodeId];
    this._touchLastUpdate();
  }
removeNode ( nodeId ) { const node = this . findNode ( nodeId ) ; if ( ! node ) { log . warn ( ` ${ nodeId } ` ) ( ) ; return ; } node . getConnectedEdges ( ) . forEach ( e => { delete this . _edgeMap [ e . getId ( ) ] ; } ) ; delete this . _nodeMap [ nodeId ] ; this . _touchLastUpdate ( ) ; }
Remove a node from the graph by node ID
 @param  {String|Number} nodeId - the ID of the target node.
Remove a node from the graph by node ID @param { String|Number } nodeId - the ID of the target node .
// remove all edges connect to this node from map // remove the node from map