0.5.1 • Published 7 years ago

pagination-info v0.5.1

Weekly downloads
3
License
ISC
Repository
github
Last release
7 years ago

calculate pagination infomation according to total records ,pagesize, and current page number

the core function :

function calculatePaginationInfo(totalRecords=10,pageSize=10,currentPage=1,semiBandWidth=5)

return a object:

{
    totalRecords,
    totalPages,
    current:currentPage,
    pageSize,
    semiBandWidth,
    firstPage:1,
    lastPage:lastPage,
    previous:previousPage,
    next:nextPage,
    firstDigit,
    lastDigit,
    arraySize, 
    array,          // array of page number : [firstDigit,LastDigit]
    shouldDisply,   // should dispaly pagination ( when the length of array is less than 2 )
}
0.5.1

7 years ago

0.5.0

7 years ago

0.4.0

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago