src/iteration/edges.js
function createEdgeArrayForNode(type, direction, nodeData) {
  const edges = [];

  if (type !== 'undirected') {
    if (direction !== 'out')
      collect(edges, nodeData.in);
    if (direction !== 'in')
      collect(edges, nodeData.out);
  }

  if (type !== 'directed') {
    collect(edges, nodeData.undirected);
  }

  return edges;
}
function createEdgeArrayForNode(type, direction, nodeData) {
  const edges = [];

  if (type !== 'undirected') {
    if (direction !== 'out')
      collect(edges, nodeData.in);
    if (direction !== 'in')
      collect(edges, nodeData.out);
  }

  if (type !== 'directed') {
    collect(edges, nodeData.undirected);
  }

  return edges;
}
function createEdgeArrayForNode ( type , direction , nodeData ) { const edges = [ ] ; if ( type !== 'undirected' ) { if ( direction !== 'out' ) collect ( edges , nodeData . in ) ; if ( direction !== 'in' ) collect ( edges , nodeData . out ) ; } if ( type !== 'directed' ) { collect ( edges , nodeData . undirected ) ; } return edges ; }
Function creating an array of edges for the given type & the given node.

@param  {string}  type      - Type of edges to retrieve.
@param  {string}  direction - In or out?
@param  {any}     nodeData  - Target node's data.
@return {array}             - Array of edges.
Function creating an array of edges for the given type & the given node .