{"id":15697574,"url":"https://github.com/kt3k/tee_async_iterable","last_synced_at":"2025-03-30T13:44:59.742Z","repository":{"id":62422062,"uuid":"361341657","full_name":"kt3k/tee_async_iterable","owner":"kt3k","description":"tee for AsyncIterable","archived":false,"fork":false,"pushed_at":"2021-12-13T06:10:46.000Z","size":13,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-18T14:49:19.903Z","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/kt3k.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-04-25T05:46:03.000Z","updated_at":"2022-11-24T17:04:13.000Z","dependencies_parsed_at":"2022-11-01T17:32:53.176Z","dependency_job_id":null,"html_url":"https://github.com/kt3k/tee_async_iterable","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Ftee_async_iterable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Ftee_async_iterable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Ftee_async_iterable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kt3k%2Ftee_async_iterable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kt3k","download_url":"https://codeload.github.com/kt3k/tee_async_iterable/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246326600,"owners_count":20759436,"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":[],"created_at":"2024-10-03T19:20:36.007Z","updated_at":"2025-03-30T13:44:59.723Z","avatar_url":"https://github.com/kt3k.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- @deprecated Use https://deno.land/std/async/tee.ts instead. --\u003e\n\n# tee_async_iterable v0.2.3\n\n\u003e [tee](https://en.wikipedia.org/wiki/Tee_%28command%29) for AsyncIterable\n\nYou can branch the given source async iterable into N async itrables.\n\n# Usage\n\nIn deno:\n\n```ts\nimport { tee } from \"https://deno.land/x/tee_async_iterable@v0.2.3/tee.ts\";\n\n// The source async iterator\nconst gen = async function* gen() {\n  yield 1;\n  yield 2;\n  yield 3;\n};\n\n// Branches the source iterator into 2 iterators.\nconst [branch1, branch2] = tee(gen());\n\n// 2 iterators work independently.\n(async () =\u003e {\n  for await (const n of branch1) {\n    console.log(n); // =\u003e 1, 2, 3\n  }\n})();\n\n(async () =\u003e {\n  for await (const n of branch2) {\n    console.log(n); // =\u003e 1, 2, 3\n  }\n})();\n```\n\nIn node.js:\n\n```ts\nimport { tee } from \"tee-async-iterable\";\n\n// The source async iterator\nconst gen = async function* gen() {\n  yield 1;\n  yield 2;\n  yield 3;\n};\n\n// Branches the source iterator into 2 iterators.\nconst [branch1, branch2] = tee(gen());\n\n// 2 iterators work independently.\n(async () =\u003e {\n  for await (const n of branch1) {\n    console.log(n); // =\u003e 1, 2, 3\n  }\n})();\n\n(async () =\u003e {\n  for await (const n of branch2) {\n    console.log(n); // =\u003e 1, 2, 3\n  }\n})();\n```\n\n# License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkt3k%2Ftee_async_iterable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkt3k%2Ftee_async_iterable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkt3k%2Ftee_async_iterable/lists"}