Skip to content

Convert the number of pages to the index of records

Notifications You must be signed in to change notification settings

zuojiang/page-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

page-converter

Convert the number of pages to the index of records.

Usage

const { calculateStart } = require('page-converter')
calculateStart(1, 10) // 0

API

  • calculateStart(pageNumber, size) Calculate the index of records.
  • calculatePageNumber(start, offset) Calculate the number of pages.
  • calculateTotalPage(total, offset) Calculate the total page.

License

MIT

About

Convert the number of pages to the index of records

Resources

Stars

Watchers

Forks

Packages