code: function (header) {
        var links = {};
  
        if (header && header.length) {
          // Split parts by comma
          var parts = header.split(',');
          // Parse each part into a named link
          for (var i = 0; i < parts.length; i++) {
            var section = parts[i].split(';');
            if (section.length !== 2) {
              throw new Error("section could not be split on ';'");
            }
            var url = section[0].replace(/<(.*)>/, '$1').trim();
            var name = section[1].replace(/rel="(.*)"/, '$1').trim();
            links[name] = url;
          }
        }
  
        return links;
      }
docs: Parse Link headers for API pagination. https://gist.github.com/niallo/3109252