paginate
paginate<
T>(fetchPage,params?):AsyncGenerator<T,void,undefined>
Defined in: packages/core/src/pagination.ts:22
Drive a cursor-paginated endpoint as an async iterator.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”fetchPage
Section titled “fetchPage”(params) => Promise<CursorPage<T>>
params?
Section titled “params?”Omit<CursorPaginationParams, "cursor"> = {}
Returns
Section titled “Returns”AsyncGenerator<T, void, undefined>
Example
Section titled “Example”for await (const order of paginate((p) => client.orders.list(p))) { console.log(order.id);}Unofficial. Lonca is an independent, community-maintained project — not affiliated with, endorsed by, or supported by Trendyol, Hepsiburada, or any other marketplace. All marketplace names and trademarks belong to their respective owners.