code: function fetchAllJSONPages(address) {
      return get(address, 'application/json').then(res => {
          return streamToText(res).then(JSON.parse).then(json => {
              // Extract next page link if it's there.
              if (res.headers['link']) {
                  const m = res.headers['link'].match(/<(https:\/\/.+)>;\s*rel=["']next["']/);
                  if (!m || m.length <= 1) {
                      // This page is final.
                      return json;
                  }
                  // Have one more page, fetch it.
                  return fetchAllJSONPages(m[1]).then(r => json.concat(r));
              } else {
                  return json;
              }
          });
      });
  }
docs: Fetches all pages from GitHub(-like) JSON API, where
  the address of the next page response is contained
  in the Link header:
  
  Link: <https://api.github.com/user/repos?page=3&per_page=100>; rel="next",
  <https://api.github.com/user/repos?page=50&per_page=100>; rel="last"
  
  @param {string} address - requested URL (must start with `https://`)