Fetches pages as an async generator, yielding each non-nullish page with its index.
Wrapper around forEachPage. Pages may yield out-of-order due to parallel fetching.
The page data type.
Fetches a page by zero-based index.
{ page, index } for each non-nullish page.
{ page, index }
If any fetch fails.
for await (const { page, index } of fetchPages(fetcher)) { console.log(`Page ${index}:`, page);} Copy
for await (const { page, index } of fetchPages(fetcher)) { console.log(`Page ${index}:`, page);}
forEachPage for a callback-based alternative.
Fetches pages as an async generator, yielding each non-nullish page with its index.
Wrapper around forEachPage. Pages may yield out-of-order due to parallel fetching.