{"repo":"aravindnc/mongoose-paginate-v2","free":true,"listed":false,"github":"https://github.com/aravindnc/mongoose-paginate-v2","clone":"git clone https://github.com/aravindnc/mongoose-paginate-v2.git","description":"A custom pagination library for Mongoose with customizable labels.","language":"JavaScript","stars":513,"topics":["pagination","paginate","paging","next","prev","nextpage","prevpage","total","paginator","mongoose"],"license":"MIT","category":"data-pipelines","readme_excerpt":"mongoose-paginate-v2 A custom pagination library for Mongoose with customizable labels. If you are looking for aggregate query pagination, use this one mongoose-aggregate-paginate-v2 Why This Plugin mongoose-paginate-v2 is a pagination library having a page wrapper. 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-paginate package by github.com/edwardhotchkiss/. So this can be considered as an upgraded version of mongoose-paginate with much more options. The below documentation is not perfect. Feel free to contribute. :) Installation Usage Add plugin to a schema and then use model paginate method: Typescript Prior to version 1.5.0 , types need to be installed from DefinitelyTyped. To declare a PaginateModel in your Typescript files: Model.paginate([query], [options], [callback]) Returns promise Parameters - [query] {Object} - Query criteria. Documentation - [options] {Object} - [select] {Object String} - Fields to return (by default returns all fields). Documentation - [collation] {Object} - Specify the collation Documentation - [sort] {Object String} - Sort order. Documentation - [populate] {Array Object String} - Paths which should be populated with other documents. Documentation - [projection] {String Object} - Get/set the query projection. Documentation - [lean=false] {Boolean} - Should return plain javascri","default_branch":null,"files":null,"tree":[],"storefront":"/r/aravindnc","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/aravindnc/mongoose-paginate-v2/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}