Socket
Socket
Sign inDemoInstall

pgsn

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    pgsn

pgsn is a node.js utils for handling pagination.


Version published
Maintainers
1
Install size
14.2 kB
Created

Readme

Source

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

  • @vivekmethew

Hi, I'm Vivek Methew! 👋

Keywords

Keywords

FAQs

Last updated on 27 Dec 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc