{"id":31838391,"url":"https://github.com/j50n/deno-asynciter","last_synced_at":"2026-05-15T13:03:27.347Z","repository":{"id":62422334,"uuid":"420278932","full_name":"j50n/deno-asynciter","owner":"j50n","description":"Map, filter, reduce for AsyncIterables in Deno.","archived":false,"fork":false,"pushed_at":"2023-06-03T19:37:07.000Z","size":31,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-30T20:58:01.219Z","etag":null,"topics":["asynciterable","asynciterableiterator","collect","concurrent","concurrent-map","deno","filter","fluent","foreach","map","reduce","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/j50n.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-10-23T00:44:46.000Z","updated_at":"2022-09-04T01:36:19.000Z","dependencies_parsed_at":"2022-11-01T17:33:15.551Z","dependency_job_id":null,"html_url":"https://github.com/j50n/deno-asynciter","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/j50n/deno-asynciter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j50n%2Fdeno-asynciter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j50n%2Fdeno-asynciter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j50n%2Fdeno-asynciter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j50n%2Fdeno-asynciter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/j50n","download_url":"https://codeload.github.com/j50n/deno-asynciter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j50n%2Fdeno-asynciter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010177,"owners_count":26084691,"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-10-12T02:00:06.719Z","response_time":53,"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":["asynciterable","asynciterableiterator","collect","concurrent","concurrent-map","deno","filter","fluent","foreach","map","reduce","typescript"],"created_at":"2025-10-12T03:20:58.582Z","updated_at":"2025-10-12T03:21:00.326Z","avatar_url":"https://github.com/j50n.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![example workflow](https://github.com/j50n/deno-asynciter/actions/workflows/deno.yml/badge.svg?branch=main)\n\n# AsyncIter: Better AsyncIterables for Deno\n\nI just want to work with `AsyncIterable` collections without using `for` loops.\nIs that so wrong?\n\nThis little library exposes both functions and a fluent-style wrapper so I can\nwrite my lazy code the way I want to: lazily.\n\nIt also supports easy in-order and out-of-order concurrent execution - with\nlimits.\n\n## Quickstart\n\nHere are some simple examples to get you started.\n\n### Convert an `Array` to `AsyncIterable`\n\n```typescript\nconst iter = asynciter([1, 2, 3]);\nfor await (const it of iter) {\n  console.log(it);\n}\n```\n\n### map\n\n```typescript\nconsole.dir(await asynciter([1, 2, 3]).map((it) =\u003e it * 2).collect());\n// [ 2, 4, 6 ]\n```\n\n### [concurrent-map.ts](./concurrent-map.ts)\n\nThere are four items in the array, but the operation will run in about two\nseconds because the operation is concurrent.\n\n```ts\nfunction delayedDouble(delay: number): (n: number) =\u003e Promise\u003cstring\u003e {\n  return (n: number) =\u003e\n    new Promise((resolve, _reject) =\u003e {\n      setTimeout(() =\u003e {\n        resolve(2 * n);\n      }, delay);\n    });\n}\n\nawait asynciter([1, 2, 3, 4]).concurrentMap(\n  delayedDouble(1000),\n  2,\n).collect();\n\n// [2, 4, 6, 8]\n```\n\n### filter\n\n```typescript\nconsole.dir(await asynciter([1, 2, 3]).filter((it) =\u003e it \u003e 1).collect());\n// [ 2, 3 ]\n```\n\n### reduce\n\n```typescript\nconsole.dir(await asynciter([1, 2, 3]).reduce(0, (a, b) =\u003e a + b));\n// 6\n```\n\n### forEach\n\n```typescript\nawait asynciter([1, 2, 3]).forEach((it) =\u003e console.log(it));\n// 1\n// 2\n// 3\n```\n\n### first\n\n```typescript\nconst iter = asynciter([1, 2, 3]);\nconsole.dir(await iter.first());\nconsole.dir(await iter.first());\n// 1\n// null\n```\n\n### collect\n\n```typescript\nconsole.dir(await asynciter([1, 2, 3]).collect());\n// [ 1, 2, 3 ]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj50n%2Fdeno-asynciter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fj50n%2Fdeno-asynciter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj50n%2Fdeno-asynciter/lists"}