code: function forEachEdgeForNode(type, direction, nodeData, callback) {
  
    if (type !== 'undirected') {
      if (direction !== 'out')
        forEach(nodeData.in, callback);
      if (direction !== 'in')
        forEach(nodeData.out, callback);
    }
  
    if (type !== 'directed') {
      forEach(nodeData.undirected, callback);
    }
  }
docs: Function iterating over a node's edges using a callback.
  
  @param  {string}   type      - Type of edges to retrieve.
  @param  {string}   direction - In or out?
  @param  {any}      nodeData  - Target node's data.
  @param  {function} callback  - Function to call.