Skip to content

Latest commit

 

History

History
17 lines (14 loc) · 579 Bytes

README.md

File metadata and controls

17 lines (14 loc) · 579 Bytes

pagingdata Build Status

npm install pagingdata

/**
 * pagingData(pageLength, length, recordsTotal, currentPage)
 * @param {Int} pageLength - Number of rows to display on a single page
 * @param {Int} length - Display length (number of records)
 * @param {Int} recordsTotal - Full data set length
 * @param {Int} currentPage - Current page index (zero based - i.e. the first page is 0)
 * @return {Array}
 */
// [0,1,2,3,4]
pagingData(10,5,70,0);