0.0.2 • Published 9 months ago
simple-mongoose-pagination v0.0.2
simple mongoose pagination
typescript
Getting Started
Technologies · Testing Tools · Installations· Tests · Acknowledgments · Author
Technologies Used
- ESLint - A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript.
- Airbnb style guide was followed.
- TypeScript
Testing Tools
- Jest Jest is a JavaScript testing framework maintained by Facebook, Inc. designed and built by Christoph Nakazawa with a focus on simplicity and support for large web applications.
Installations
Getting started
- You need to have Node and NPM installed on your computer.
- Installing Node automatically comes with npm.
Clone
- Clone this project to your local machine
https://github.com/oluwabukolatina/simple-mongoose-pagination.git
Setup
- Installing the project dependencies
Run the command below
$ npm install simple-mongoose-pagination
Usage
$ const result = getPaginationQueryDetails({pageNumber, itemsPerPage},totalItemsCount)
$ currentPage: 3,limit: 10, skip: 20,totalItemsCount: 200,totalPages: 20
Tests
run the command below
$ npm run watch
Author