Guest User

Untitled

a guest
Jul 22nd, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. Pager = (function() {
  2. function Pager(attributes) {
  3. this.currentPage = attributes.current_page;
  4. this.totalPages = attributes.total_pages;
  5. this.perPage = attributes.per_page;
  6. this.totalEntries = attributes.total_entries;
  7. }
  8. Pager.prototype.firstPage = function() {
  9. return this.currentPage === 1;
  10. };
  11. Pager.prototype.lastPage = function() {
  12. return this.currentPage === this.totalPages;
  13. };
  14. return Pager;
  15. })();
Add Comment
Please, Sign In to add comment