Skip to content

feat(horizonPaginator): add generic paginateArray helper (#618) - #817

Open
Solis666 wants to merge 1 commit into
Stellar-split:mainfrom
Solis666:feature/618-paginate-array
Open

feat(horizonPaginator): add generic paginateArray helper (#618)#817
Solis666 wants to merge 1 commit into
Stellar-split:mainfrom
Solis666:feature/618-paginate-array

Conversation

@Solis666

@Solis666 Solis666 commented Sep 5, 2026

Copy link
Copy Markdown

Summary

Implements the generic paginateArray helper requested in #618.

Changes

  • Added paginateArray<T> to src/horizonPaginator.ts
  • Added support for 1-indexed pagination
  • Returns data, total, totalPages, hasNext, and hasPrev
  • Handles out-of-range pages according to the issue requirements
  • Validates pageSize according to the specified constraints
  • Exported the helper and its types from src/index.ts
  • Added unit tests covering the required behavior

Closes #618

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add generic paginateArray helper to horizonPaginator

1 participant