4.60.0 • Published 3 years ago
pagination-utils v4.60.0
@deque/pagination-utils
A collection of pagination related utilities.
Installation
npm install @deque/pagination-utils --registry=http://agora.dequecloud.com/artifactory/api/npm/dequelabsAPI
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.
4.60.0
3 years ago