{"id":18013410,"url":"https://github.com/milly/ts-streams","last_synced_at":"2025-09-10T21:33:50.527Z","repository":{"id":241803790,"uuid":"801983261","full_name":"Milly/ts-streams","owner":"Milly","description":"Typescript modules that provides utilities for Streams API. Like RXJS.","archived":false,"fork":false,"pushed_at":"2025-07-04T01:07:24.000Z","size":260,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-06T21:26:26.810Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://jsr.io/@milly/streams","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/Milly.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,"zenodo":null}},"created_at":"2024-05-17T09:37:37.000Z","updated_at":"2025-07-03T14:49:10.000Z","dependencies_parsed_at":"2024-06-25T14:10:04.873Z","dependency_job_id":"a9a00a1c-56cc-410a-8310-15560e1160a0","html_url":"https://github.com/Milly/ts-streams","commit_stats":null,"previous_names":["milly/ts-streams"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/Milly/ts-streams","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Milly%2Fts-streams","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Milly%2Fts-streams/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Milly%2Fts-streams/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Milly%2Fts-streams/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Milly","download_url":"https://codeload.github.com/Milly/ts-streams/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Milly%2Fts-streams/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274528111,"owners_count":25302343,"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-09-10T02:00:12.551Z","response_time":83,"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-10-30T03:21:23.796Z","updated_at":"2025-09-10T21:33:50.476Z","avatar_url":"https://github.com/Milly.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# streams\n\n[![license:MIT](https://img.shields.io/github/license/Milly/ts-streams)](LICENSE)\n[![jsr](https://jsr.io/badges/@milly/streams)](https://jsr.io/@milly/streams)\n[![Test](https://github.com/Milly/ts-streams/actions/workflows/test.yml/badge.svg)](https://github.com/Milly/ts-streams/actions/workflows/test.yml)\n[![codecov](https://codecov.io/gh/Milly/ts-streams/branch/master/graph/badge.svg)](https://codecov.io/gh/Milly/ts-streams)\n\nTypeScript modules that provides utilities for\n[Streams API](https://developer.mozilla.org/docs/Web/API/Streams_API).\n\n## Example\n\n```typescript\nimport { from } from \"@milly/streams/readable/from\";\nimport { fromMessage } from \"@milly/streams/readable/from-message\";\nimport { switchMap } from \"@milly/streams/transform/switch-map\";\nimport { take } from \"@milly/streams/transform/take\";\nimport { forEach } from \"@milly/streams/writable/for-each\";\nimport { postMessage } from \"@milly/streams/writable/post-message\";\nimport { assertEquals } from \"@std/assert\";\n\nasync function* gen() {\n  yield 1;\n  await Promise.resolve();\n  yield \"foo\";\n  await Promise.resolve();\n  yield true;\n}\n\nconst { port1, port2 } = new MessageChannel();\n\nfrom(gen())\n  .pipeThrough(switchMap((chunk) =\u003e [chunk, typeof chunk]))\n  .pipeTo(postMessage(port1))\n  .finally(() =\u003e port1.close());\n\nconst result: unknown[] = [];\n\nawait fromMessage(port2)\n  .pipeThrough(take(6))\n  .pipeTo(forEach((chunk) =\u003e {\n    result.push(chunk);\n  }))\n  .finally(() =\u003e port2.close());\n\nassertEquals(result, [\n  1,\n  \"number\",\n  \"foo\",\n  \"string\",\n  true,\n  \"boolean\",\n]);\n```\n\n## License\n\nThis library is licensed under the MIT License. See the [LICENSE](./LICENSE)\nfile for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilly%2Fts-streams","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmilly%2Fts-streams","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilly%2Fts-streams/lists"}