code: function forEachInObject(nodeData, object, callback) {
    for (const k in object) {
      let edgeData = object[k];
  
      if (edgeData instanceof Set)
        edgeData = edgeData.values().next().value;
  
      const sourceData = edgeData.source,
            targetData = edgeData.target;
  
      const neighborData = sourceData === nodeData ? targetData : sourceData;
  
      callback(
        neighborData.key,
        neighborData.attributes
      );
    }
  }
docs: Function iterating over the given node's relevant neighbors using a
  callback.
  
  @param  {string}   type      - Type of neighbors.
  @param  {string}   direction - Direction.
  @param  {any}      nodeData  - Target node's data.
  @param  {function} callback  - Callback to use.