{"id":29717501,"url":"https://github.com/tauseefk/rex","last_synced_at":"2026-01-20T16:56:10.776Z","repository":{"id":275708578,"uuid":"926934527","full_name":"tauseefk/rex","owner":"tauseefk","description":"Everything is streams.","archived":false,"fork":false,"pushed_at":"2025-07-14T02:21:33.000Z","size":87,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-24T09:19:32.248Z","etag":null,"topics":["functional-programming","stream"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/rextream","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/tauseefk.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":"2025-02-04T05:32:44.000Z","updated_at":"2025-07-14T02:21:37.000Z","dependencies_parsed_at":"2025-02-04T06:31:00.342Z","dependency_job_id":"9f7a696f-73f3-4de8-a7d2-2ad0ff93639c","html_url":"https://github.com/tauseefk/rex","commit_stats":null,"previous_names":["tauseefk/rex"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tauseefk/rex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tauseefk%2Frex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tauseefk%2Frex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tauseefk%2Frex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tauseefk%2Frex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tauseefk","download_url":"https://codeload.github.com/tauseefk/rex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tauseefk%2Frex/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268315948,"owners_count":24231059,"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-01T02:00:08.611Z","response_time":67,"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":["functional-programming","stream"],"created_at":"2025-07-24T07:43:20.144Z","updated_at":"2026-01-20T16:56:10.771Z","avatar_url":"https://github.com/tauseefk.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Rex\n\n![rex-with-border@2x](https://github.com/user-attachments/assets/f2dbe8c0-052b-417b-bf7b-efef108ecbe4)\n\nTiny arms but bytes.\n\n#### Create a stream and subscribe\n\n```typescript\n// - `Stream.fromInterval(100)` creates a stream that emits a value every 100 milliseconds.\n// - `skipN(10)` creates a filter that allows only every 10th value to pass through.\nconst $oneSecStream = Stream.fromInterval(100).filter(skipN(10));\n\n// - The stream will print emitted values until the emitted value is 50, then unsubscribes.\n// - Once unsubscribed or naturally completed, the completion handler is executed.\n$oneSecStream.subscribe({\n  next: (tick) =\u003e {\n    console.log(tick);\n    if (tick \u003e= 50) $oneSecStream.unsubscribe?.();\n  },\n  complete: () =\u003e {\n    console.log('stream concluded');\n  },\n});\n\n```\n\n#### Combine two streams\n\n```typescript\n// Emit a tuple of values every 500 millisecond\n//\n// - `Stream.fromInterval(500)` creates a stream that emits a value every 500 milliseconds.\n// - `Stream.fromInterval(1000)` creates a stream that emits a value every 1 second.\n// - withLatestFrom combines both the Streams.\nconst $halfSecStream = Stream.fromInterval(500);\nconst $mixedTimerStream =\n  Stream.fromInterval(1000).withLatestFrom($halfSecStream);\n\n$mixedTimerStream.subscribe({\n  next: ([halfSecTick, oneSecTick]) =\u003e {\n    console.log(halfSecTick, oneSecTick);\n    if (halfSecTick \u003e= 5) $mixedTimerStream.unsubscribe?.();\n  },\n  complete: () =\u003e {\n    console.log('stream concluded');\n  },\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftauseefk%2Frex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftauseefk%2Frex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftauseefk%2Frex/lists"}