{"id":20059862,"url":"https://github.com/deiucanta/pagelist","last_synced_at":"2026-04-28T12:01:24.085Z","repository":{"id":57318103,"uuid":"409262971","full_name":"deiucanta/pagelist","owner":"deiucanta","description":"Pagination logic/algorithm in Javascript","archived":false,"fork":false,"pushed_at":"2021-09-22T16:30:58.000Z","size":149,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-30T13:16:06.906Z","etag":null,"topics":["algorithm","javascript","pagelist","pagination","paginator","typescript"],"latest_commit_sha":null,"homepage":"","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/deiucanta.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}},"created_at":"2021-09-22T15:43:38.000Z","updated_at":"2021-09-22T18:20:19.000Z","dependencies_parsed_at":"2022-08-25T20:41:10.858Z","dependency_job_id":null,"html_url":"https://github.com/deiucanta/pagelist","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/deiucanta/pagelist","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deiucanta%2Fpagelist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deiucanta%2Fpagelist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deiucanta%2Fpagelist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deiucanta%2Fpagelist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deiucanta","download_url":"https://codeload.github.com/deiucanta/pagelist/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deiucanta%2Fpagelist/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32379629,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T11:25:28.583Z","status":"ssl_error","status_checked_at":"2026-04-28T11:25:05.435Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["algorithm","javascript","pagelist","pagination","paginator","typescript"],"created_at":"2024-11-13T13:10:18.614Z","updated_at":"2026-04-28T12:01:24.054Z","avatar_url":"https://github.com/deiucanta.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pagelist\n\n## Install\n\n```\nnpm install pagelist\n```\n\n```\nyarn add pagelist\n```\n\n## Usage\n\n```js\nimport { pagelist } from 'pagelist';\n\nconst current = 1;\nconst total = 500;\nconst display = 9;\n\npagelist(current, total, display);\n// =\u003e 1, 2, 3, 4, 5, 6, 7, _, 500\n```\n\n## Examples\n\n| Current | Total | Display | Result                                  |\n| ------- | ----- | ------- | --------------------------------------- |\n| 1       | 1     | 10      | `[1]`                                   |\n| 1       | 10    | 10      | `[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]`       |\n| 2       | 10    | 10      | `[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]`       |\n| 1       | 1000  | 10      | `[1, 2, 3, 4, 5, 6, 7, 8, '-', 1000]`   |\n| 5       | 1000  | 10      | `[1, 2, 3, 4, 5, 6, 7, 8, '-', 1000]`   |\n| 6       | 1000  | 10      | `[1, '-', 4, 5, 6, 7, 8, 9, '-', 1000]` |\n| 500     | 1000  | 7       | `[1, '-', 499, 500, 501, '-', 1000]`    |\n| 1000    | 1000  | 7       | `[1, '-', 996, 997, 998, 999, 1000`     |\n| 995     | 1000  | 7       | `[1, '-', 994, 995, 996, '-', 1000]`    |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeiucanta%2Fpagelist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeiucanta%2Fpagelist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeiucanta%2Fpagelist/lists"}