perpage
Little library to do the simple maths of working out pagination.
const perPage1 = 1 50; // current page, items per pageperPage1total = 150; console; // => 0console; // => { page: 1, next: 2 } const perPage2 = 2 50; // current page, items per pageperPage2total = 150; console; // => 0console; // => { page: 2, previous: 1, next: 3 }