traverse/incoming.js
function linkParent(original, branch, parentPayload, nextPayload)
{
  // get proper name
  var normalized = normalize(branch);

  var result = original(branch, parentPayload, nextPayload);

  // add normalized handle reference
  // skip if it's empty string
  if (normalized)
  {
    result.__proto__[normalized] = parentPayload;
  }

  // add user object reference
  if (parentPayload.user)
  {
    result.__proto__['user'] = parentPayload.user;
  }

  return result;
}
function linkParent(original, branch, parentPayload, nextPayload)
{
  // get proper name
  var normalized = normalize(branch);

  var result = original(branch, parentPayload, nextPayload);

  // add normalized handle reference
  // skip if it's empty string
  if (normalized)
  {
    result.__proto__[normalized] = parentPayload;
  }

  // add user object reference
  if (parentPayload.user)
  {
    result.__proto__['user'] = parentPayload.user;
  }

  return result;
}
function linkParent ( original , branch , parentPayload , nextPayload ) { // get proper name var normalized = normalize ( branch ) ; var result = original ( branch , parentPayload , nextPayload ) ; // add normalized handle reference // skip if it's empty string if ( normalized ) { result . __proto__ [ normalized ] = parentPayload ; } // add user object reference if ( parentPayload . user ) { result . __proto__ [ 'user' ] = parentPayload . user ; } return result ; }
Wraps original linkParent method
and adds normalized handle reference to the parent object

@param   {function} original - original linkParent method
@param   {string} branch - current branch of the payload
@param   {object} parentPayload - parent payload object
@param   {mixed} nextPayload - next step payload object
@returns {mixed} - augmented next step payload object
Wraps original linkParent method and adds normalized handle reference to the parent object