You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// for importing the package in commonjsconst{ 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 .