2.1.0 • Published 10 years ago

perpage v2.1.0

Weekly downloads
65
License
-
Repository
-
Last release
10 years ago

perpage

Little library to do the simple maths of working out pagination.

const perPage1 = new PerPage(1, 50); // current page, items per page
perPage1.total = 150;

console.log(perPage1.offset); // => 0
console.log(perPage1.toObject); // => { page: 1, next: 2 }

const perPage2 = new PerPage(2, 50); // current page, items per page
perPage2.total = 150;

console.log(perPage2.offset); // => 0
console.log(perPage2.toObject); // => { page: 2, previous: 1, next: 3 }
2.1.0

10 years ago

2.0.1

10 years ago

2.0.0

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago