code: function createEdgeIteratorForNode(type, direction, nodeData) {
    let iterator = Iterator.empty();
  
    if (type !== 'undirected') {
      if (direction !== 'out' && typeof nodeData.in !== 'undefined')
        iterator = chain(iterator, createIterator(nodeData.in));
      if (direction !== 'in' && typeof nodeData.out !== 'undefined')
        iterator = chain(iterator, createIterator(nodeData.out));
    }
  
    if (type !== 'directed' && typeof nodeData.undirected !== 'undefined') {
      iterator = chain(iterator, createIterator(nodeData.undirected));
    }
  
    return iterator;
  }
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.
  @return {Iterator}