{"id":15686860,"url":"https://github.com/lambdalisue/deno-indexer","last_synced_at":"2026-04-28T20:07:46.888Z","repository":{"id":231841605,"uuid":"633441568","full_name":"lambdalisue/deno-indexer","owner":"lambdalisue","description":"🦕 The indexer library is a Deno module that provides a class called Indexer, which generates index numbers.","archived":false,"fork":false,"pushed_at":"2024-04-06T07:27:45.000Z","size":10,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-09T05:47:14.978Z","etag":null,"topics":["deno","indexer","jsr"],"latest_commit_sha":null,"homepage":"https://jsr.io/@lambdalisue/indexer","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/lambdalisue.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}},"created_at":"2023-04-27T14:00:15.000Z","updated_at":"2024-04-06T10:45:15.000Z","dependencies_parsed_at":"2024-04-06T08:27:34.016Z","dependency_job_id":"53aa07e3-d99d-4490-b0b9-879a0aa05bcc","html_url":"https://github.com/lambdalisue/deno-indexer","commit_stats":null,"previous_names":["lambdalisue/deno-indexer"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdalisue%2Fdeno-indexer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdalisue%2Fdeno-indexer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdalisue%2Fdeno-indexer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lambdalisue%2Fdeno-indexer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lambdalisue","download_url":"https://codeload.github.com/lambdalisue/deno-indexer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246311212,"owners_count":20757090,"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":["deno","indexer","jsr"],"created_at":"2024-10-03T17:41:37.864Z","updated_at":"2026-04-28T20:07:41.865Z","avatar_url":"https://github.com/lambdalisue.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# indexer\n\n[![jsr](https://img.shields.io/jsr/v/%40lambdalisue/indexer?logo=javascript\u0026logoColor=white)](https://jsr.io/@lambdalisue/indexer)\n[![denoland](https://img.shields.io/github/v/release/lambdalisue/deno-indexer?logo=deno\u0026label=denoland)](https://github.com/lambdalisue/deno-indexer/releases)\n[![deno doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/indexer/mod.ts)\n[![Test](https://github.com/lambdalisue/deno-indexer/workflows/Test/badge.svg)](https://github.com/lambdalisue/deno-indexer/actions?query=workflow%3ATest)\n\nThe `indexer` library is a [Deno] module that provides a class called `Indexer`,\nwhich generates index numbers.\n\n## Usage\n\nTo use the `Indexer` class, you first need to import it from the `indexer`\nmodule:\n\n```typescript\nimport { Indexer } from \"@lambdalisue/indexer\";\n```\n\nYou can then create a new instance of the `Indexer` class with an optional `max`\nvalue:\n\n```typescript\nconst indexer = new Indexer(10);\n```\n\nThis creates an `Indexer` instance with a maximum index value of 10. If the\n`max` parameter is omitted, the maximum safe integer value will be used instead.\n\nYou can generate index numbers by calling the `next()` method on the `Indexer`\ninstance:\n\n```typescript\nconst index1 = indexer.next(); // 0\nconst index2 = indexer.next(); // 1\nconst index3 = indexer.next(); // 2\n// ...\nconst index10 = indexer.next(); // 9\n```\n\nWhen the index number reaches the maximum value, it will be reset to 0 and the\n`next()` method will start generating index numbers from 0 again.\n\n## License\n\nThe code follows the MIT license written in [LICENSE](./LICENSE). Contributors\nneed to agree that any modifications sent in this repository follow the license.\n\n[Deno]: https://deno.land/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdalisue%2Fdeno-indexer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flambdalisue%2Fdeno-indexer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdalisue%2Fdeno-indexer/lists"}