{"id":21186857,"url":"https://github.com/patrickroberts/iterablex","last_synced_at":"2025-08-03T14:08:14.809Z","repository":{"id":220748558,"uuid":"751135253","full_name":"patrickroberts/iterablex","owner":"patrickroberts","description":"Lazy method chaining iterables","archived":false,"fork":false,"pushed_at":"2024-02-04T02:22:41.000Z","size":23,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-14T20:18:44.272Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/patrickroberts.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":"2024-02-01T01:57:07.000Z","updated_at":"2024-02-01T23:04:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"5f820d25-22c0-4180-951d-06451324b9af","html_url":"https://github.com/patrickroberts/iterablex","commit_stats":null,"previous_names":["patrickroberts/iterablex"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/patrickroberts/iterablex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickroberts%2Fiterablex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickroberts%2Fiterablex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickroberts%2Fiterablex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickroberts%2Fiterablex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patrickroberts","download_url":"https://codeload.github.com/patrickroberts/iterablex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickroberts%2Fiterablex/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268554909,"owners_count":24269062,"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","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-20T18:26:46.911Z","updated_at":"2025-08-03T14:08:14.784Z","avatar_url":"https://github.com/patrickroberts.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iterablex\n\nLazy method chaining iterables\n\n## About\n\nThis library exports a function to create a lazy iterable from any [iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol). The return value's type will depend on what operations the original iterable supports:\n\n- A `ContiguousRange` for any [`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray)\n- A `RandomAccessRange` for any iterable not above implementing a constant-time `.at(index)` method\n- A `ForwardRange` for any iterable not above that can be iterated without consuming the input\n- An `InputRange` for any other iterable not above\n\nA `BidirectionalRange` may be returned by some of the lazy methods for `ContiguousRange`, `RandomAccessRange`, and itself, to indicate the returned iterable supports lazy `.toReversed()` without buffering.\n\n## Lazy methods:\n\n- `.drop(count: number)`\n- `.entries()`\n- `.filter(predicate: (value, index) =\u003e boolean)`\n- `.flatMap(callback: (value, index) =\u003e iterable)`\n- `.map(callback: (value, index) =\u003e any)`\n- `.scan(callback: (previous, value, index) =\u003e next, initial?)`\n- `.slice(begin?, end?)`\n- `.take(count: number)`\n- `.toReversed()`\n- `.toSorted(compare?: (a, b) =\u003e number)`\n\n## Eager methods:\n\n- `.at(index: number): value?`\n- `.every(predicate: (value, index) =\u003e boolean): boolean`\n- `.find(predicate: (value, index) =\u003e boolean): value?`\n- `.findIndex(predicate: (value, index) =\u003e boolean): number`\n- `.findLast(predicate: (value, index) =\u003e boolean): value?`\n- `.findLastIndex(predicate: (value, index) =\u003e boolean): number`\n- `.first(predicate?: (value, index) =\u003e boolean): value?`\n- `.forEach(callback: (value, index) =\u003e void): void`\n- `.includes(value, fromIndex?: number): boolean`\n- `.indexOf(value, fromIndex?: number): number`\n- `.last(predicate?: (value, index) =\u003e boolean): value?`\n- `.lastIndexOf(value, fromIndex?: number): number`\n- `.reduce(callback: (previous, value, index) =\u003e next, initial?)`\n- `.some(predicate: (value, index) =\u003e boolean): boolean`\n- `.toArray(): array`\n\n...and more to come!\n\n## TODO\n\n- Tests (and bugfixes)\n- More documentation\n- More methods\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickroberts%2Fiterablex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatrickroberts%2Fiterablex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickroberts%2Fiterablex/lists"}