All Projects → polo2ro → node-paginate-anything

polo2ro / node-paginate-anything

Licence: other
nodejs server side module for angular-pagninate-anything

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to node-paginate-anything

vue-tiny-pagination
A Vue component for create a tiny pagination with Flexbox
Stars: ✭ 20 (+11.11%)
Mutual labels:  paginate
paginathing
a jQuery plugin to paginate your DOM easily.
Stars: ✭ 23 (+27.78%)
Mutual labels:  paginate
sql-repository
[PHP 7] SQL Repository implementation
Stars: ✭ 37 (+105.56%)
Mutual labels:  paginate
mongoose-aggregate-paginate-v2
A cursor based custom aggregate pagination library for Mongoose with customizable labels.
Stars: ✭ 103 (+472.22%)
Mutual labels:  paginate
PagedLists
Paginated UITableView and UICollectionViews for iOS.
Stars: ✭ 69 (+283.33%)
Mutual labels:  paginate
autopagerize
Infiniscroll on web pages using a large database of rules. A fully reworked fork of the original extension.
Stars: ✭ 55 (+205.56%)
Mutual labels:  paginate
React Paginate
A ReactJS component that creates a pagination
Stars: ✭ 2,169 (+11950%)
Mutual labels:  paginate
python-paginate
Pagination support for python web frameworks (study from will_paginate).
Stars: ✭ 17 (-5.56%)
Mutual labels:  paginate
scrivener list
A Scrivener compatible extension that allows pagination of a list of elements.
Stars: ✭ 23 (+27.78%)
Mutual labels:  paginate
eloquent-mongodb-repository
Eloquent MongoDB Repository Implementation
Stars: ✭ 18 (+0%)
Mutual labels:  paginate

node-paginate-anything

Build Status Dependency Status devDependency Status

nodejs server side module for angular-paginate-anything

This nodejs module add the required headers in the http response to paginate the items. This is a rewrite of clean_pagination

Install

  npm install node-paginate-anything

Usage

  var paginate = require('node-paginate-anything');
  
  var queryParameters = paginate(ClientRequest, ServerResponse, totalItems, maxRangeSize);
  
  mongooseQuery.limit(queryParameters.limit);
  mongooseQuery.skip(queryParameters.skip);
parameter Description
ClientRequest clientRequest object from the native http module or from an express app.
ServerResponse ServerResponse object to modify before sending the http response.
totalItems total number of items in the result set.
maxRangeSize angular-paginate-anything send is own requested range in the request, this parameter specify the maximum value.

Benefits

  • HTTP Content-Type agnoticism. Information about total items, selected ranges, and next- previous-links are sent through headers. It works without modifying your API payload in any way.
  • Graceful degredation. Both client and server specify the maximum page size they accept and communication gracefully degrades to accomodate the lesser.
  • Expressive retrieval. This approach, unlike the use of per_page and page parameters, allows the client to request any (possibly unbounded) interval of items.
  • Semantic HTTP. Built in strict conformance to RFCs 2616 and 5988.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].