src/iteration/edges.js
function createIteratorForKey(object, k) {
  const v = object[k];

  if (v instanceof Set) {
    const iterator = v.values();

    return new Iterator(function() {
      const step = iterator.next();

      if (step.done)
        return step;

      const edgeData = step.value;

      return {
        done: false,
        value: [
          edgeData.key,
          edgeData.attributes,
          edgeData.source.key,
          edgeData.target.key,
          edgeData.source.attributes,
          edgeData.target.attributes
        ]
      };
    });
  }

  return Iterator.of([
    v.key,
    v.attributes,
    v.source.key,
    v.target.key,
    v.source.attributes,
    v.target.attributes
  ]);
}
function createIteratorForKey(object, k) {
  const v = object[k];

  if (v instanceof Set) {
    const iterator = v.values();

    return new Iterator(function() {
      const step = iterator.next();

      if (step.done)
        return step;

      const edgeData = step.value;

      return {
        done: false,
        value: [
          edgeData.key,
          edgeData.attributes,
          edgeData.source.key,
          edgeData.target.key,
          edgeData.source.attributes,
          edgeData.target.attributes
        ]
      };
    });
  }

  return Iterator.of([
    v.key,
    v.attributes,
    v.source.key,
    v.target.key,
    v.source.attributes,
    v.target.attributes
  ]);
}
function createIteratorForKey ( object , k ) { const v = object [ k ] ; if ( v instanceof Set ) { const iterator = v . values ( ) ; return new Iterator ( function ( ) { const step = iterator . next ( ) ; if ( step . done ) return step ; const edgeData = step . value ; return { done : false , value : [ edgeData . key , edgeData . attributes , edgeData . source . key , edgeData . target . key , edgeData . source . attributes , edgeData . target . attributes ] } ; } ) ; } return Iterator . of ( [ v . key , v . attributes , v . source . key , v . target . key , v . source . attributes , v . target . attributes ] ) ; }
Function returning an iterator over the egdes from the object at given key.

@param  {object}   object   - Target object.
@param  {mixed}    k        - Neighbor key.
@return {Iterator}
Function returning an iterator over the egdes from the object at given key .