pagination-utils
TypeScript icon, indicating that this package has built-in type declarations

4.60.0 • Public • Published

@deque/pagination-utils

A collection of pagination related utilities.

Installation

npm install @deque/pagination-utils --registry=http://agora.dequecloud.com/artifactory/api/npm/dequelabs

API

utils.Headers (enum)

An enum of the supported HTTP headers used for pagination.

utils.Pagination (type)

A TypeScript interface describing paginated metadata.

utils.Paginated<T> (type)

A TypeScript utility type for a paginated data.

utils.getPagination(data): Pagination

Get pagination metadata from data.

utils.setPagination<T>(data: T, pagination): Paginated<T>

Add pagination metadata to data.

utils.setResponseHeaders(res, pagination)

Set pagination headers on the given res.

utils.parseRequestHeaders(req)

Parse pagination headers from the given req.

Readme

Keywords

none

Package Sidebar

Install

npm i pagination-utils

Weekly Downloads

1

Version

4.60.0

License

UNLICENSED

Unpacked Size

7.77 kB

Total Files

5

Last publish

Collaborators

  • npmdeque