page-converter

1.0.1 • Public • Published

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

Package Sidebar

Install

npm i page-converter

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

3.05 kB

Total Files

4

Last publish

Collaborators

  • zuojiang