paginator-js

1.0.2 • Public • Published

paginator-js

A very simple and clean implementation for using the pagination feature in any project.

Usage

Suppose, you have an array of objects that you need to paginate.

let array = [
  {a: 1},
  {a: 2},
  {a: 3},
  ...
  ...
  ...
  {a: 100}
]

Now if you need to get the third page with 10 items you can use the code below

array.paginate(3, 10)

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i paginator-js

      Weekly Downloads

      0

      Version

      1.0.2

      License

      MIT

      Unpacked Size

      1.41 kB

      Total Files

      3

      Last publish

      Collaborators

      • rohitksh619