src/iteration/edges.js
function createEdgeIteratorForPath(type, direction, sourceData, target) {
  let iterator = Iterator.empty();

  if (type !== 'undirected') {

    if (
      typeof sourceData.in !== 'undefined' &&
      direction !== 'out' &&
      target in sourceData.in
    )
      iterator = chain(iterator, createIteratorForKey(sourceData.in, target));

    if (
      typeof sourceData.out !== 'undefined' &&
      direction !== 'in' &&
      target in sourceData.out
    )
      iterator = chain(iterator, createIteratorForKey(sourceData.out, target));
  }

  if (type !== 'directed') {
    if (
      typeof sourceData.undirected !== 'undefined' &&
      target in sourceData.undirected
    )
      iterator = chain(iterator, createIteratorForKey(sourceData.undirected, target));
  }

  return iterator;
}
function createEdgeIteratorForPath(type, direction, sourceData, target) {
  let iterator = Iterator.empty();

  if (type !== 'undirected') {

    if (
      typeof sourceData.in !== 'undefined' &&
      direction !== 'out' &&
      target in sourceData.in
    )
      iterator = chain(iterator, createIteratorForKey(sourceData.in, target));

    if (
      typeof sourceData.out !== 'undefined' &&
      direction !== 'in' &&
      target in sourceData.out
    )
      iterator = chain(iterator, createIteratorForKey(sourceData.out, target));
  }

  if (type !== 'directed') {
    if (
      typeof sourceData.undirected !== 'undefined' &&
      target in sourceData.undirected
    )
      iterator = chain(iterator, createIteratorForKey(sourceData.undirected, target));
  }

  return iterator;
}
function createEdgeIteratorForPath ( type , direction , sourceData , target ) { let iterator = Iterator . empty ( ) ; if ( type !== 'undirected' ) { if ( typeof sourceData . in !== 'undefined' && direction !== 'out' && target in sourceData . in ) iterator = chain ( iterator , createIteratorForKey ( sourceData . in , target ) ) ; if ( typeof sourceData . out !== 'undefined' && direction !== 'in' && target in sourceData . out ) iterator = chain ( iterator , createIteratorForKey ( sourceData . out , target ) ) ; } if ( type !== 'directed' ) { if ( typeof sourceData . undirected !== 'undefined' && target in sourceData . undirected ) iterator = chain ( iterator , createIteratorForKey ( sourceData . undirected , target ) ) ; } return iterator ; }
Function returning an iterator over edges for the given path.

@param  {string}   type       - Type of edges to retrieve.
@param  {string}   direction  - In or out?
@param  {NodeData} sourceData - Source node's data.
@param  {string}   target     - Target node.
@param  {function} callback   - Function to call.
Function returning an iterator over edges for the given path .