Miss any of our Open RFC calls?Watch the recordings here! »

@fiquu/pagination

1.0.2 • Public • Published

@fiquu/pagination

Build Status GitHub GitHub last commit npm (scoped) npm

Simple pagination component.

Installation

npm i @fiquu/pagination

Usage

import { createPagination, PaginationComponent } from '@fiquu/pagination';
 
const pagination: PaginationComponent = createPagination({ limit: 50 });
 
const { limit, skip } = pagination.paginate(3); // limit = 50; skip = 100;
 
// Or in some query...
const query = await Posts.find()
  .skip(pagination.skip(req.query.page))
  .limit(pagination.limit);

Documentation

Please see https://fiquu.github.io/pagination/ for more details.

Install

npm i @fiquu/pagination

DownloadsWeekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

10.1 kB

Total Files

11

Last publish

Collaborators

  • avatar