UNPKG

fhir-kit-client

Version:
18 lines 591 B
/** * Pagination helper — used internally by Client. */ export class Pagination { httpClient; constructor(httpClient) { this.httpClient = httpClient; } nextPage(bundle, options) { const link = bundle.link?.find((l) => l.relation === 'next'); return link ? this.httpClient.get(link.url, options) : undefined; } prevPage(bundle, options) { const link = bundle.link?.find((l) => /^prev(ious)?$/.test(l.relation)); return link ? this.httpClient.get(link.url, options) : undefined; } } //# sourceMappingURL=pagination.js.map