Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cheesegrinder/mongoose-plugin-paginate

Typescript pagination plugin for mongoose
https://github.com/cheesegrinder/mongoose-plugin-paginate

mongoose pagination plugin typescript

Last synced: 16 days ago
JSON representation

Typescript pagination plugin for mongoose

Awesome Lists containing this project

README

        

# mongoose-plugin-pagination
Pagination plugin for mongoose

[![Node.js CI](https://github.com/CheeseGrinder/mongoose-plugin-paginate/actions/workflows/Node.Js.yml/badge.svg)](https://github.com/CheeseGrinder/mongoose-plugin-paginate/actions/workflows/Node.Js.yml)

[![Node.js Publish](https://github.com/CheeseGrinder/mongoose-plugin-paginate/actions/workflows/npm-publish.yml/badge.svg)](https://github.com/CheeseGrinder/mongoose-plugin-paginate/actions/workflows/npm-publish.yml)

## Why This Plugin
mongoose-plugin-paginate is a cursor based pagination library having a page wrapper. The plugin can be used as both page as well as cursor based pagination. The main usage of the plugin is you can alter the return value keys directly in the query itself so that you don't need any extra code for transformation. The initial idea of this plugin is loosely based on mongoose-plugin-paginate package by github.com/edwardhotchkiss/. So this can be considered as an upgraded version of mongoose-plugin-paginate with much more options.

The below documentation is not perfect. Feel free to contribute. :)

## Installation
```bash
npm install mongoose-plugin-pagination
```