Streaming counterpart of cursorFetch: yields one page at a time.
for await (const { items } of cursorStream({ fetcher: ({ cursor }) => api.items({ cursor }), getCursor: (r) => r.nextCursor ?? null, getItems: (r) => r.data,})) { await handle(items);} Copy
for await (const { items } of cursorStream({ fetcher: ({ cursor }) => api.items({ cursor }), getCursor: (r) => r.nextCursor ?? null, getItems: (r) => r.data,})) { await handle(items);}
Streaming counterpart of cursorFetch: yields one page at a time.