src/iteration/edges.js
function forEachForKey(object, k, callback) {

  if (!(k in object))
    return;

  if (object[k] instanceof Set)
    object[k].forEach(edgeData => callback(
      edgeData.key,
      edgeData.attributes,
      edgeData.source.key,
      edgeData.target.key,
      edgeData.source.attributes,
      edgeData.target.attributes
    ));
  else {
    const edgeData = object[k];

    callback(
      edgeData.key,
      edgeData.attributes,
      edgeData.source.key,
      edgeData.target.key,
      edgeData.source.attributes,
      edgeData.target.attributes
    );
  }

  return;
}
function forEachForKey(object, k, callback) {

  if (!(k in object))
    return;

  if (object[k] instanceof Set)
    object[k].forEach(edgeData => callback(
      edgeData.key,
      edgeData.attributes,
      edgeData.source.key,
      edgeData.target.key,
      edgeData.source.attributes,
      edgeData.target.attributes
    ));
  else {
    const edgeData = object[k];

    callback(
      edgeData.key,
      edgeData.attributes,
      edgeData.source.key,
      edgeData.target.key,
      edgeData.source.attributes,
      edgeData.target.attributes
    );
  }

  return;
}
function forEachForKey ( object , k , callback ) { if ( ! ( k in object ) ) return ; if ( object [ k ] instanceof Set ) object [ k ] . forEach ( edgeData => callback ( edgeData . key , edgeData . attributes , edgeData . source . key , edgeData . target . key , edgeData . source . attributes , edgeData . target . attributes ) ) ; else { const edgeData = object [ k ] ; callback ( edgeData . key , edgeData . attributes , edgeData . source . key , edgeData . target . key , edgeData . source . attributes , edgeData . target . attributes ) ; } return ; }
Function iterating over the egdes from the object at given key using
a callback.

@param {object}   object   - Target object.
@param {mixed}    k        - Neighbor key.
@param {function} callback - Callback to use.
Function iterating over the egdes from the object at given key using a callback .