1.1.3 • Published 5 months ago

pgsn v1.1.3

Weekly downloads
-
License
ISC
Repository
-
Last release
5 months ago

pgsn Pagination

pgsn is a node.js utils for handling pagination.

Installation

  npm install --save pgsn

Usages

   const { PGSN } = require("pgsn");


   try {
    const response = PGSN.getPagingData({
        rows: [
            { name: 'test1', email: 'test1@gmail.com' },
            { name: 'test2', email: 'test2@gmail.com' },
        ], // rows data must be a array
        totalItems: 5,  // totalItems must be a number
        page: 1, // page must be a number
        limit: 2 // limit must be a number
    })

    console.log(response)
}catch(error) {
    console.log(error)
}

Authors

Hi, I'm Vivek Methew! 👋

Keywords

1.1.3

5 months ago

1.1.2

5 months ago

1.1.1

5 months ago

1.1.0

5 months ago