Skip to main content
This package works with Node.jsIt is unknown whether this package works with Cloudflare Workers, Deno, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
It is unknown whether this package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score
35%
Published
4 months ago (0.15.1)
class Paginator

Constructors

new
Paginator(paginationOpts?: PaginationOptions)

Methods

fromAll<T>(coll: T[]): Paginated<T>
fromSubset<T>(
coll: T[],
totalElements: number,
): Paginated<T>

Static Properties

Static Methods

fromAll<T>(
coll: T[],
unnamed 1: PaginationOptions,
): Paginated<T>
fromSubset<T>(
coll: T[],
unnamed 1: PaginationOptions,
totalElements: number,
): Paginated<T>

For cases where the input data has already been sliced according to the pagination options, e.g. using a DB query

Add Package

deno add jsr:@carbonteq/hexapp

Import symbol

import { Paginator } from "@carbonteq/hexapp";

---- OR ----

Import directly with a jsr specifier

import { Paginator } from "jsr:@carbonteq/hexapp";

Add Package

npx jsr add @carbonteq/hexapp

Import symbol

import { Paginator } from "@carbonteq/hexapp";

Add Package

yarn dlx jsr add @carbonteq/hexapp

Import symbol

import { Paginator } from "@carbonteq/hexapp";

Add Package

pnpm dlx jsr add @carbonteq/hexapp

Import symbol

import { Paginator } from "@carbonteq/hexapp";

Add Package

bunx jsr add @carbonteq/hexapp

Import symbol

import { Paginator } from "@carbonteq/hexapp";