example/middleware/api.js
function getNextPageUrl(response) {
  const link = response.headers.get('link');
  if (!link) {
    return null;
  }

  const nextLink = link.split(',').filter(s => s.indexOf('rel="next"') > -1)[0];
  if (!nextLink) {
    return null;
  }

  return nextLink.split(';')[0].slice(1, -1);
}
function getNextPageUrl(response) {
  const link = response.headers.get('link');
  if (!link) {
    return null;
  }

  const nextLink = link.split(',').filter(s => s.indexOf('rel="next"') > -1)[0];
  if (!nextLink) {
    return null;
  }

  return nextLink.split(';')[0].slice(1, -1);
}
function getNextPageUrl ( response ) { const link = response . headers . get ( 'link' ) ; if ( ! link ) { return null ; } const nextLink = link . split ( ',' ) . filter ( s => s . indexOf ( 'rel="next"' ) > - 1 ) [ 0 ] ; if ( ! nextLink ) { return null ; } return nextLink . split ( ';' ) [ 0 ] . slice ( 1 , - 1 ) ; }
Extracts the next page URL from Github API response.
Extracts the next page URL from Github API response .