lib/routes/whereis.js
function redirect(id, prefix, suffix, res) {
  var validatedID = reelib.identifier.toIdentifierString(id);

  if(validatedID && (validatedID !== id)) {
    res.redirect(prefix + validatedID + suffix);
    return true;
  }

  return false;
}
function redirect(id, prefix, suffix, res) {
  var validatedID = reelib.identifier.toIdentifierString(id);

  if(validatedID && (validatedID !== id)) {
    res.redirect(prefix + validatedID + suffix);
    return true;
  }

  return false;
}
function redirect ( id , prefix , suffix , res ) { var validatedID = reelib . identifier . toIdentifierString ( id ) ; if ( validatedID && ( validatedID !== id ) ) { res . redirect ( prefix + validatedID + suffix ) ; return true ; } return false ; }
Redirect if required and return the status.
@param {String} id The given ID.
@param {String} prefix The prefix to the ID in the path.
@param {String} suffix The suffix to the ID in the path.
@param {Object} res The HTTP result.
@return {boolean} Redirection performed?
Redirect if required and return the status .