setup-node/node_modules/octokit-pagination-methods/lib/has-first-page.js

10 lines
335 B
JavaScript
Raw Permalink Normal View History

2019-08-06 23:29:44 +01:00
module.exports = hasFirstPage
const deprecate = require('./deprecate')
const getPageLinks = require('./get-page-links')
function hasFirstPage (link) {
deprecate(`octokit.hasFirstPage() You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`)
return getPageLinks(link).first
}