src/iteration/edges.js
function createEdgeArrayForPath(type, direction, sourceData, target) {
  const edges = [];

  if (type !== 'undirected') {

    if (typeof sourceData.in !== 'undefined' && direction !== 'out')
      collectForKey(edges, sourceData.in, target);

    if (typeof sourceData.out !== 'undefined' && direction !== 'in')
      collectForKey(edges, sourceData.out, target);
  }

  if (type !== 'directed') {
    if (typeof sourceData.undirected !== 'undefined')
      collectForKey(edges, sourceData.undirected, target);
  }

  return edges;
}
function createEdgeArrayForPath(type, direction, sourceData, target) {
  const edges = [];

  if (type !== 'undirected') {

    if (typeof sourceData.in !== 'undefined' && direction !== 'out')
      collectForKey(edges, sourceData.in, target);

    if (typeof sourceData.out !== 'undefined' && direction !== 'in')
      collectForKey(edges, sourceData.out, target);
  }

  if (type !== 'directed') {
    if (typeof sourceData.undirected !== 'undefined')
      collectForKey(edges, sourceData.undirected, target);
  }

  return edges;
}
function createEdgeArrayForPath ( type , direction , sourceData , target ) { const edges = [ ] ; if ( type !== 'undirected' ) { if ( typeof sourceData . in !== 'undefined' && direction !== 'out' ) collectForKey ( edges , sourceData . in , target ) ; if ( typeof sourceData . out !== 'undefined' && direction !== 'in' ) collectForKey ( edges , sourceData . out , target ) ; } if ( type !== 'directed' ) { if ( typeof sourceData . undirected !== 'undefined' ) collectForKey ( edges , sourceData . undirected , target ) ; } return edges ; }
Function creating an array of 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  {any}      target     - Target node.
@return {array}               - Array of edges.
Function creating an array of edges for the given path .