{"id":25590676,"url":"https://github.com/t99/iter-over","last_synced_at":"2026-04-11T19:30:19.391Z","repository":{"id":48281716,"uuid":"190824026","full_name":"T99/iter-over","owner":"T99","description":"Sugary iteration utilities and interfaces.","archived":false,"fork":false,"pushed_at":"2021-11-02T12:34:56.000Z","size":731,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-16T11:55:25.784Z","etag":null,"topics":["async-iterable","async-iterables","async-iteration","async-iterator","async-iterators","for-await","for-await-of","for-each","for-in","for-of","iterable","iterables","iteration","iterator","iterators","typescript"],"latest_commit_sha":null,"homepage":"https://T99.github.io/iter-over/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/T99.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"license.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["T99"]}},"created_at":"2019-06-07T23:35:54.000Z","updated_at":"2024-11-23T05:55:55.000Z","dependencies_parsed_at":"2022-09-18T15:31:44.343Z","dependency_job_id":null,"html_url":"https://github.com/T99/iter-over","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T99%2Fiter-over","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T99%2Fiter-over/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T99%2Fiter-over/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T99%2Fiter-over/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/T99","download_url":"https://codeload.github.com/T99/iter-over/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239986432,"owners_count":19729617,"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":["async-iterable","async-iterables","async-iteration","async-iterator","async-iterators","for-await","for-await-of","for-each","for-in","for-of","iterable","iterables","iteration","iterator","iterators","typescript"],"created_at":"2025-02-21T09:22:52.959Z","updated_at":"2026-04-11T19:30:19.330Z","avatar_url":"https://github.com/T99.png","language":"TypeScript","funding_links":["https://github.com/sponsors/T99"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\u003ccode\u003eiter-over\u003c/code\u003e\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n\titer-over is an iteration toolset for JavaScript/TypeScript that provides interfaces as well as utility classes for\n\titeration using the native JavaScript \u003ccode\u003eSymbol.iterator\u003c/code\u003e method (and \u003ccode\u003eSymbol.asyncIterator\u003c/code\u003e!).\n\u003c/p\u003e\n\n\u003ch3 align=\"center\"\u003e\u003ca href=\"https://www.npmjs.com/package/iter-over\"\u003eFind iter-over on NPM.\u003c/a\u003e\u003c/h3\u003e\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Basic Usage](#basic-usage)\n- [Documentation](#documentation)\n- [License](#license)\n\n## Installation\nInstall from NPM with\n```\n$ npm install --save iter-over\n```\n\n## Basic Usage\nFor most use-cases you'll want to extend `AbstractIterator` (the iter-over abstract iterator class). This abstract class\nimplements such methods as `#forEachRemaining(callback)` and automagically implements the `[Symbol.iterator]` method so\nthat you don't have to!\n\nThe only methods you have to implement are:\n\n```typescript\npublic hasNext(): boolean { ... }\npublic next(): E | undefined { ... }\n```\n\nSo for example, an inline implementation would look something like:\n\n```typescript\nimport { AbstractIterator } from \"iter-over\";\n\nclass MyCounter extends AbstractIterator\u003cnumber\u003e {\n\n\tprivate val: number = 0;\n\t\n\tpublic hasNext(): boolean {\n\t\t\n\t\treturn (this.val \u003c= 9);\n\t\t\n\t}\n\t\n\tpublic next(): number {\n\t\t\n\t\treturn this.val++;\n\t\t\n\t}\n\t\n}\n```\n\nOnce you've done that, you can freely use the iterator as such:\n\n```typescript\nlet counter: MyCounter = new MyCounter();\n\nfor (let counterVal of counter) console.log(counterVal);\n\n// ...console logs 0 through 9.\n```\n\n## Documentation\nFull documentation can be found [here](https://t99.github.io/iter-over/)!\n\n## License\niter-over is made available under the GNU General Public License v3.\n\nCopyright (C) 2021 Trevor Sears\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft99%2Fiter-over","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft99%2Fiter-over","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft99%2Fiter-over/lists"}