Calculation Methods
Methods for calculating pagination offsets, total pages, and metadata.
offset() / getOffset() / skipCount()
Signature
offset(): number
getOffset(): number // alias
skipCount(): number // aliasReturns
number: Items to skip for current page.
Formula
(currentPage - 1) * itemsPerPage
Example
playground.ts
totalPages()
Signature
totalPages(): numberReturns
number: Total page count.
Formula
Math.ceil(totalItems / itemsPerPage)
Example
playground.ts
getMeta()
Signature
getMeta(): PaginatorMetaReturns
PaginatorMeta: Complete pagination metadata.
interface PaginatorMeta {
totalItems: number;
currentPage: number;
itemsPerPage: number;
totalPages: number;
hasPrev: boolean;
hasNext: boolean;
isFirst: boolean;
isLast: boolean;
offset: number;
}Example
playground.ts
Last updated: Sun, Jun 14, 2026 07:15:25PM (UTC)
