Skip to content

KanishkRastogi46/paginate-data-array

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installing the package

npm install paginate-data-array

Importing the package

// for importing the package in commonjs
const { pagination } = require("paginate-data-array");

Usage

pagination(data , page , limit)
// data - an array
// page - defines the page number to be displayed
// limit - number of results in a single page

Parameters required

1. data (required) ✅ - It is an array of any data type and can also contain the data extracted from a database that has to be shown to the user .

2. page (optional)❓- If no value is provided , by default it will be equal to 1 and if provided value is <=0 it will automatically make the page value to 1 .

3. limit (optional)❓- If no value is provided , by default it will be equal to 10 . If provided value is <=0 or > than the length of data parameter it will automatically make the page value to 1 and limit value to 10 .

*Note :-

1. node version should be >=20.11.1 ✅

2. npm version should be >=10.8.2 ✅

Email :- [email protected] 🔥

About

A NPM package for Pagination feature to add into your JavaScript app

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published