lib/links.js
function makeLink(rel, ldo) {
  var i, key, keys, result;

  if (typeof ldo === 'string') {
    return '<' + ldo + '>; rel="' + rel + '"';
  }

  result = '<' + ldo.href + '>; rel="' + rel + '"';
  keys = Object.keys(ldo);

  for (i = 0; i < keys.length; i += 1) {
    key = keys[i];

    if (key !== 'href' && key !== 'rel') {
      result += '; ' + key + '="' + ldo[key] + '"';
    }
  }

  return result;
}
function makeLink(rel, ldo) {
  var i, key, keys, result;

  if (typeof ldo === 'string') {
    return '<' + ldo + '>; rel="' + rel + '"';
  }

  result = '<' + ldo.href + '>; rel="' + rel + '"';
  keys = Object.keys(ldo);

  for (i = 0; i < keys.length; i += 1) {
    key = keys[i];

    if (key !== 'href' && key !== 'rel') {
      result += '; ' + key + '="' + ldo[key] + '"';
    }
  }

  return result;
}
function makeLink ( rel , ldo ) { var i , key , keys , result ; if ( typeof ldo === 'string' ) { return '<' + ldo + '>; rel="' + rel + '"' ; } result = '<' + ldo . href + '>; rel="' + rel + '"' ; keys = Object . keys ( ldo ) ; for ( i = 0 ; i < keys . length ; i += 1 ) { key = keys [ i ] ; if ( key !== 'href' && key !== 'rel' ) { result += '; ' + key + '="' + ldo [ key ] + '"' ; } } return result ; }
Set Link header field with the given `links`.

Examples:

res.links({
next: 'http://api.example.com/users?page=2',
last: 'http://api.example.com/users?page=5'
});

@param {Object} links
@return {ServerResponse}
@api public
Set Link header field with the given links .