Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Pager = (function() {
- function Pager(attributes) {
- this.currentPage = attributes.current_page;
- this.totalPages = attributes.total_pages;
- this.perPage = attributes.per_page;
- this.totalEntries = attributes.total_entries;
- }
- Pager.prototype.firstPage = function() {
- return this.currentPage === 1;
- };
- Pager.prototype.lastPage = function() {
- return this.currentPage === this.totalPages;
- };
- return Pager;
- })();
Add Comment
Please, Sign In to add comment