2.1.0 • Published 8 years ago

perpage v2.1.0

Weekly downloads
65
License
-
Repository
-
Last release
8 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

8 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.0.8

9 years ago

1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago