@sqrtthree/pagination
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

pagination

npm

Some helpers about pagination.

Install

yarn add @sqrtthree/pagination

# OR use npm
npm install @sqrtthree/pagination

How to usage

paginate(data, options?: {page?: boolean, offset?: boolean, maxPerPage?: number, maxLimit?: number })

@return { page: number = 1, perPage: number = 10, offset: number = 0, limit: number = 10 }

paginateWithCursor(data, options?: { maxLimit?: number })

@return { cursor: string | number, limit: number = 10 }


sqrtthree.com  ·  GitHub @sqrthree  ·  Twitter @sqrtthree

Readme

Keywords

none

Package Sidebar

Install

npm i @sqrtthree/pagination

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

14 kB

Total Files

14

Last publish

Collaborators

  • sqrtthree