simple-mongoose-pagination
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

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

Package Sidebar

Install

npm i simple-mongoose-pagination

Weekly Downloads

47

Version

0.0.2

License

none

Unpacked Size

8.06 kB

Total Files

10

Last publish

Collaborators

  • oluwabukolatina