{"id":15110281,"url":"https://github.com/jhony2488/pagination-frontend","last_synced_at":"2026-02-18T17:31:26.844Z","repository":{"id":57318169,"uuid":"380418257","full_name":"jhony2488/pagination-frontend","owner":"jhony2488","description":"pagination-front-end é uma biblioteca voltada para realização de paginação no front end(is a front-end paging library)","archived":false,"fork":false,"pushed_at":"2024-05-09T11:19:56.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T00:49:01.019Z","etag":null,"topics":["front","front-end","front-end-development","frontend","javascript","javascript-es6","javascript-library","library","library-automation","library-free","paginate","pagination","pagination-library","paginator","typescript","typescript-library","typescript2"],"latest_commit_sha":null,"homepage":"https://github.com/jhony2488/pagination-frontend","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jhony2488.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-26T05:07:16.000Z","updated_at":"2024-05-09T11:19:59.000Z","dependencies_parsed_at":"2024-05-09T12:32:14.769Z","dependency_job_id":"602cb25e-d83a-4b74-9ffd-0862e13a2076","html_url":"https://github.com/jhony2488/pagination-frontend","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhony2488%2Fpagination-frontend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhony2488%2Fpagination-frontend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhony2488%2Fpagination-frontend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhony2488%2Fpagination-frontend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jhony2488","download_url":"https://codeload.github.com/jhony2488/pagination-frontend/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247981025,"owners_count":21027846,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["front","front-end","front-end-development","frontend","javascript","javascript-es6","javascript-library","library","library-automation","library-free","paginate","pagination","pagination-library","paginator","typescript","typescript-library","typescript2"],"created_at":"2024-09-25T23:43:51.064Z","updated_at":"2025-10-10T19:36:06.089Z","avatar_url":"https://github.com/jhony2488.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# pagination-front-end(Paginação no front end)\n\n\u003cp align=\"center\" id=\"about\"\u003e🚀 Português: pagination-front-end é uma biblioteca voltada para realização de paginação no front end\u003c/p\u003e\n\u003cp align=\"center\" id=\"about-english\"\u003e🚀 Inglês: pagination-front-end is a front-end paging library\u003c/p\u003e\n\n\u003ch2 id=\"tabela-de-conteudo\"\u003eTabela de conteúdos(table of contents)\u003c/h2\u003e\n\u003c!--ts--\u003e\n   \n- [Sobre(About)](#about)\n\n- [Tabela de Conteudo(table of contents)](#tabela-de-conteudo)\n\n- [Como usar(How to use)](#como-usar)\n\n  - [Instalação(Installation)](#instalacao)\n  \n  - [Uso(Use)](#uso)\n\n- [Testes(Tests)](#-testes)\n\n- [Tecnologias(Technologies)](#tecnologias)\n\n- [Autor(Author)](#autor)\n\n- [Licença(License)](#licenca)\n\u003c!--te--\u003e\n\n\u003ch2 id=\"como-usar\"\u003eComo usar(How to use)\u003c/h2\u003e\n\n\u003ch3 id=\"instalacao\"\u003eInstalação(Installation)\u003c/h3\u003e\n\n```bash\n# Instalação(Installation)\n$ npm i pagination-front-end || yarn add pagination-front-end\n\n```\n\n\u003ch3\u003eInstalação baixando o repositório(Installation by downloading the repository)\u003c/h3\u003e\n\n```bash\n# Clone este repositório(Clone this repository)\n$ git clone https://github.com/jhony2488/pagination-frontend\n\n# Acesse a pasta do projeto no terminal/cmd(Access the project folder in the terminal/cmd)\n$ cd pagination-frontend\n\n# Instale as dependências(install dependencies)\n$ npm install || yarn add\n\n```\n\n\u003ch3 id=\"uso\"\u003eUso(Use)\u003c/h3\u003e\n\n```js\nconst pagination = require('pagination-front-end'); // or import pagination from 'pagination-front-end' in typescript\n\nconst drones = [\n  {\n    id: 3,\n    image: 'https://robohash.org/fugaaperiamofficiis.jpg?size=50x50\u0026set=set1',\n    name: 'Gabbie',\n    address: '559 Moose Street',\n    battery: 15,\n    max_speed: 37.7,\n    average_speed: 18.7,\n    status: 'flying',\n    fly: 76,\n  },\n  {\n    id: 4,\n    image: 'https://robohash.org/quiavoluptatemillum.jpg?size=50x50\u0026set=set1',\n    name: 'Audrie',\n    address: '9460 Canary Junction',\n    battery: 49,\n    max_speed: 19.4,\n    average_speed: 19.1,\n    status: 'flying',\n    fly: 26,\n  },\n  {\n    id: 5,\n    image: 'https://robohash.org/liberoperferendissapiente.jpg?size=50x50\u0026set=set1',\n    name: 'Doreen',\n    address: '62 Rusk Avenue',\n    battery: 56,\n    max_speed: 35.7,\n    average_speed: 22.8,\n    status: 'flying',\n    fly: 27,\n  },\n  {\n    id: 6,\n    image: 'https://robohash.org/quaecumqueid.bmp?size=50x50\u0026set=set1',\n    name: 'Gustaf',\n    address: '687 Grim Place',\n    battery: 70,\n    max_speed: 38.7,\n    average_speed: 1.6,\n    status: 'flying',\n    fly: 67,\n  },\n  {\n    id: 7,\n    image: 'https://robohash.org/omnisquiamet.jpg?size=50x50\u0026set=set1',\n    name: 'Othilie',\n    address: '0249 Daystar Park',\n    battery: 50,\n    max_speed: 12.7,\n    average_speed: 10.2,\n    status: 'flying',\n    fly: 41,\n  },\n  {\n    id: 8,\n    image: 'https://robohash.org/quiavoluptasut.png?size=50x50\u0026set=set1',\n    name: 'Rosene',\n    address: '7016 Shelley Circle',\n    battery: 51,\n    max_speed: 3.3,\n    average_speed: 9.2,\n    status: 'charging',\n    fly: 35,\n  },\n  {\n    id: 9,\n    image: 'https://robohash.org/nonoccaecatitemporibus.bmp?size=50x50\u0026set=set1',\n    name: 'Franklin',\n    address: '63991 Rigney Point',\n    battery: 21,\n    max_speed: 40.5,\n    average_speed: 5,\n    status: 'charging',\n    fly: 0,\n  },\n  {\n    id: 10,\n    image: 'https://robohash.org/doloresnonsit.bmp?size=50x50\u0026set=set1',\n    name: 'Lynel',\n    address: '3080 Ludington Alley',\n    battery: 73,\n    max_speed: 27.3,\n    average_speed: 15.7,\n    status: 'success',\n    fly: 18,\n  },\n  {\n    id: 11,\n    image: 'https://robohash.org/adautemenim.bmp?size=50x50\u0026set=set1',\n    name: 'Gunar',\n    address: '15295 Crowley Lane',\n    battery: 86,\n    max_speed: 37.5,\n    average_speed: 14,\n    status: 'flying',\n    fly: 66,\n  },\n  {\n    id: 12,\n    image: 'https://robohash.org/quisdoloreearum.jpg?size=50x50\u0026set=set1',\n    name: 'Kasey',\n    address: '064 Delaware Lane',\n    battery: 51,\n    max_speed: 3.2,\n    average_speed: 9.1,\n    status: 'repair',\n    fly: 43,\n  },\n  {\n    id: 13,\n    image: 'https://robohash.org/rationenonpossimus.png?size=50x50\u0026set=set1',\n    name: 'Delly',\n    address: '6533 Basil Crossing',\n    battery: 67,\n    max_speed: 25,\n    average_speed: 28,\n    status: 'flying',\n    fly: 91,\n  },\n  {\n    id: 14,\n    image: 'https://robohash.org/suscipitvelofficiis.jpg?size=50x50\u0026set=set1',\n    name: 'Norma',\n    address: '80060 Riverside Drive',\n    battery: 16,\n    max_speed: 18.9,\n    average_speed: 3.6,\n    status: 'repair',\n    fly: 90,\n  },\n];\n// Pagination.pagination(items: any[], currentPage: number = 1, pageSize: number = 20) \nconst paginationPage1= pagination(drones, 1, 5);\n\n// Pagination.pagination(items: any[], currentPage: number = 1, pageSize: number = 20) \nconst paginationPage2= pagination(drones, 2, 5);\n\nconsole.log(paginationPage1)\n/*\n{\n  AllItems: 12,\n  currentPage: 1,\n  pageSize: 5,\n  allPages: 2,\n  startPage: 1,\n  endPage: 2,\n  startIndex: 0,\n  endIndex: 4,\n  pages: [ 1, 2 ],\n  items: [\n    {\n      id: 3,\n      image: 'https://robohash.org/fugaaperiamofficiis.jpg?size=50x50\u0026set=set1',\n      name: 'Gabbie',\n      address: '559 Moose Street',\n      battery: 15,\n      max_speed: 37.7,\n      average_speed: 18.7,\n      status: 'flying',\n      fly: 76\n    },\n    {\n      id: 4,\n      image: 'https://robohash.org/quiavoluptatemillum.jpg?size=50x50\u0026set=set1',\n      name: 'Audrie',\n      address: '9460 Canary Junction',\n      battery: 49,\n      max_speed: 19.4,\n      average_speed: 19.1,\n      status: 'flying',\n      fly: 26\n    },\n    {\n      id: 5,\n      image: 'https://robohash.org/liberoperferendissapiente.jpg?size=50x50\u0026set=set1',\n      name: 'Doreen',\n      address: '62 Rusk Avenue',\n      battery: 56,\n      max_speed: 35.7,\n      average_speed: 22.8,\n      status: 'flying',\n      fly: 27\n    },\n    {\n      id: 6,\n      image: 'https://robohash.org/quaecumqueid.bmp?size=50x50\u0026set=set1',\n      name: 'Gustaf',\n      address: '687 Grim Place',\n      battery: 70,\n      max_speed: 38.7,\n      average_speed: 1.6,\n      status: 'flying',\n      fly: 67\n    },\n    {\n      id: 7,\n      image: 'https://robohash.org/omnisquiamet.jpg?size=50x50\u0026set=set1',\n      name: 'Othilie',\n      address: '0249 Daystar Park',\n      battery: 50,\n      max_speed: 12.7,\n      average_speed: 10.2,\n      status: 'flying',\n      fly: 41\n    }\n  ]\n}\n*/\n\nconsole.log(paginationPage2)\n/*\n{\n  AllItems: 12,\n  currentPage: 2,\n  pageSize: 5,\n  allPages: 2,\n  startPage: 1,\n  endPage: 2,\n  startIndex: 5,\n  endIndex: 9,\n  pages: [ 1, 2 ],\n  items: [\n    {\n      id: 8,\n      image: 'https://robohash.org/quiavoluptasut.png?size=50x50\u0026set=set1',\n      name: 'Rosene',\n      address: '7016 Shelley Circle',\n      battery: 51,\n      max_speed: 3.3,\n      average_speed: 9.2,\n      status: 'charging',\n      fly: 35\n    },\n    {\n      id: 9,\n      image: 'https://robohash.org/nonoccaecatitemporibus.bmp?size=50x50\u0026set=set1',\n      name: 'Franklin',\n      address: '63991 Rigney Point',\n      battery: 21,\n      max_speed: 40.5,\n      average_speed: 5,\n      status: 'charging',\n      fly: 0\n    },\n    {\n      id: 10,\n      image: 'https://robohash.org/doloresnonsit.bmp?size=50x50\u0026set=set1',\n      name: 'Lynel',\n      address: '3080 Ludington Alley',\n      battery: 73,\n      max_speed: 27.3,\n      average_speed: 15.7,\n      status: 'success',\n      fly: 18\n    },\n    {\n      id: 11,\n      image: 'https://robohash.org/adautemenim.bmp?size=50x50\u0026set=set1',\n      name: 'Gunar',\n      address: '15295 Crowley Lane',\n      battery: 86,\n      max_speed: 37.5,\n      average_speed: 14,\n      status: 'flying',\n      fly: 66\n    },\n    {\n      id: 12,\n      image: 'https://robohash.org/quisdoloreearum.jpg?size=50x50\u0026set=set1',\n      name: 'Kasey',\n      address: '064 Delaware Lane',\n      battery: 51,\n      max_speed: 3.2,\n      average_speed: 9.1,\n      status: 'repair',\n      fly: 43\n    }\n  ]\n}\n*/\n\n//pegar somente os itens \n// get only the items\nconsole.log(paginationPage1.items)\n/*\n [\n    {\n      id: 3,\n      image: 'https://robohash.org/fugaaperiamofficiis.jpg?size=50x50\u0026set=set1',\n      name: 'Gabbie',\n      address: '559 Moose Street',\n      battery: 15,\n      max_speed: 37.7,\n      average_speed: 18.7,\n      status: 'flying',\n      fly: 76\n    },\n    {\n      id: 4,\n      image: 'https://robohash.org/quiavoluptatemillum.jpg?size=50x50\u0026set=set1',\n      name: 'Audrie',\n      address: '9460 Canary Junction',\n      battery: 49,\n      max_speed: 19.4,\n      average_speed: 19.1,\n      status: 'flying',\n      fly: 26\n    },\n    {\n      id: 5,\n      image: 'https://robohash.org/liberoperferendissapiente.jpg?size=50x50\u0026set=set1',\n      name: 'Doreen',\n      address: '62 Rusk Avenue',\n      battery: 56,\n      max_speed: 35.7,\n      average_speed: 22.8,\n      status: 'flying',\n      fly: 27\n    },\n    {\n      id: 6,\n      image: 'https://robohash.org/quaecumqueid.bmp?size=50x50\u0026set=set1',\n      name: 'Gustaf',\n      address: '687 Grim Place',\n      battery: 70,\n      max_speed: 38.7,\n      average_speed: 1.6,\n      status: 'flying',\n      fly: 67\n    },\n    {\n      id: 7,\n      image: 'https://robohash.org/omnisquiamet.jpg?size=50x50\u0026set=set1',\n      name: 'Othilie',\n      address: '0249 Daystar Park',\n      battery: 50,\n      max_speed: 12.7,\n      average_speed: 10.2,\n      status: 'flying',\n      fly: 41\n    }\n  ]\n\n*/\n//pegar somente os itens \n// get only the items\nconsole.log(paginationPage2.items)\n\n/*\n[\n    {\n      id: 8,\n      image: 'https://robohash.org/quiavoluptasut.png?size=50x50\u0026set=set1',\n      name: 'Rosene',\n      address: '7016 Shelley Circle',\n      battery: 51,\n      max_speed: 3.3,\n      average_speed: 9.2,\n      status: 'charging',\n      fly: 35\n    },\n    {\n      id: 9,\n      image: 'https://robohash.org/nonoccaecatitemporibus.bmp?size=50x50\u0026set=set1',\n      name: 'Franklin',\n      address: '63991 Rigney Point',\n      battery: 21,\n      max_speed: 40.5,\n      average_speed: 5,\n      status: 'charging',\n      fly: 0\n    },\n    {\n      id: 10,\n      image: 'https://robohash.org/doloresnonsit.bmp?size=50x50\u0026set=set1',\n      name: 'Lynel',\n      address: '3080 Ludington Alley',\n      battery: 73,\n      max_speed: 27.3,\n      average_speed: 15.7,\n      status: 'success',\n      fly: 18\n    },\n    {\n      id: 11,\n      image: 'https://robohash.org/adautemenim.bmp?size=50x50\u0026set=set1',\n      name: 'Gunar',\n      address: '15295 Crowley Lane',\n      battery: 86,\n      max_speed: 37.5,\n      average_speed: 14,\n      status: 'flying',\n      fly: 66\n    },\n    {\n      id: 12,\n      image: 'https://robohash.org/quisdoloreearum.jpg?size=50x50\u0026set=set1',\n      name: 'Kasey',\n      address: '064 Delaware Lane',\n      battery: 51,\n      max_speed: 3.2,\n      average_speed: 9.1,\n      status: 'repair',\n      fly: 43\n    }\n  ]\n\n*/\n```\n\n\n\u003ch2 id=\"tests\"\u003e🛠 Testes(Tests)\u003c/h2\u003e\n\n```bash\n# Executar os testes(Run the tests)\n$ npm run test || yarn test\n\n```\n\n\u003ch2 id=\"tecnologias\"\u003e🛠 Tecnologias(Technologies)\u003c/h2\u003e\n\nPortuguês: As seguintes ferramentas foram usadas na construção desta biblioteca:\nEnglish: The following tools were used in building this library:\n\n- [Node.js](https://nodejs.org/en/)\n- [TypeScript](https://www.typescriptlang.org/)\n- [Jest](https://jestjs.io/)\n- [Eslint](https://eslint.org/)\n- [Prettier](https://prettier.io/)\n\nObs: A build para javascript de publicação e executada automaticamente.\n\n\u003ch2 id=\"autor\" align=\"center\"\u003eAutor(Author)\u003c/h2\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n\u003ca href=\"https://jhonyaraujo.netlify.app/\"\u003e\n \u003cimg style=\"border-radius: 50%;\" src=\"https://avatars.githubusercontent.com/u/52162636?s=96\u0026v=4\" width=\"200px;\" alt=\"Jhonata Vinicius\"/\u003e\n \u003cbr /\u003e\n \u003ch2\u003eJhonata Vinicius Da Silva Araujo(Jhony Araujo) \u003c/h2\u003e\u003c/a\u003e\n\n\u003cp\u003eFeito por Jhonata Vinicius 👋🏽 Entre em contato!(Made by Jhonata Vinicius 👋🏽 Get in touch!)\u003c/p\u003e\n\n\u003ca href=\"https://www.linkedin.com/in/jhonyaraujo/\" target=\"_blank\"\u003e\n  \u003cimg align=\"center\" src=\"https://img.shields.io/badge/LinkedIn-05122A?style=for-the-badge\u0026logo=linkedin\" alt=\"linkedin\"/\u003e\n\u003c/a\u003e \n\u003ca href=\"https://www.instagram.com/jhony.dev.oficial/\" target=\"_blank\"\u003e\n  \u003cimg align=\"center\" src=\"https://img.shields.io/badge/Instagram-05122A?style=for-the-badge\u0026logo=instagram\" alt=\"instagram\"/\u003e\n\u003c/a\u003e \n  \u003ca href=\"https://dev.to/jhonyaraujooficial\" target=\"_blank\"\u003e\n  \u003cimg align=\"center\" src=\"https://img.shields.io/badge/dev.to-05122A?style=for-the-badge\u0026logo=devdotto\u0026logoColor=white\" alt=\"My Blog\"/\u003e\n\u003c/a\u003e\n  \u003ca href=\"https://www.behance.net/jhonyaraujoelemental\" target=\"_blank\"\u003e\n  \u003cimg align=\"center\" src=\"https://img.shields.io/badge/-Behance-05122A?style=for-the-badge\u0026logo=behance\u0026logoColor=white\" alt=\"My behance profile\"/\u003e\n\u003c/a\u003e\n\n\u003c/div\u003e\n\n\u003ch2 id=\"licenca\"\u003eLicença(License)\u003c/h2\u003e\n\n\u003ca href=\"https://github.com/jhony2488/pagination-frontend/blob/master/LICENSE\" align=\"center\"\u003eMIT\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhony2488%2Fpagination-frontend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjhony2488%2Fpagination-frontend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhony2488%2Fpagination-frontend/lists"}