{"id":17095090,"url":"https://github.com/harunurhan/rx-socket.io-client","last_synced_at":"2025-06-22T01:38:11.903Z","repository":{"id":28486005,"uuid":"118527778","full_name":"harunurhan/rx-socket.io-client","owner":"harunurhan","description":"rxjs powered socket.io-client wrapper","archived":false,"fork":false,"pushed_at":"2023-02-27T15:30:00.000Z","size":127,"stargazers_count":2,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T23:13:58.289Z","etag":null,"topics":["reactivex","rxjs","socket-io","socket-io-client","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/harunurhan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-01-22T23:10:38.000Z","updated_at":"2023-08-07T10:59:56.000Z","dependencies_parsed_at":"2024-10-24T05:19:56.905Z","dependency_job_id":"27c8d479-c903-4891-a3e9-b8a0f2720d57","html_url":"https://github.com/harunurhan/rx-socket.io-client","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"739e858f2b6c736199780463a3a92f936a392928"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harunurhan%2Frx-socket.io-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harunurhan%2Frx-socket.io-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harunurhan%2Frx-socket.io-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harunurhan%2Frx-socket.io-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harunurhan","download_url":"https://codeload.github.com/harunurhan/rx-socket.io-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248643006,"owners_count":21138355,"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":["reactivex","rxjs","socket-io","socket-io-client","typescript"],"created_at":"2024-10-14T14:25:46.552Z","updated_at":"2025-04-12T23:14:03.263Z","avatar_url":"https://github.com/harunurhan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## rx-socket.io-client\n\nEasy to use `rxjs` powered wrapper for `socket.io-client`.\n\n*Although current API is experimental and limited, there __won't__ be any breaking release without major release*\n\n### Install\n\n`npm install --save rx-socket.io-client`\n\nRequires `socket.io-client` and `rxjs` as `peerDependency`, incase you don't have them also run:\n\n`npm install --save socket.io-client rxjs`\n\n### Use\n\n```typescript\nimport { RxSocket } from 'rx-socket.io-client';\n\n\nconst socket = new RxSocket('/url/to/socket.io/server'); // javascript \n\nconst event$ = socket.subject('event_name'); // get rxjs/Subject for a specific event\n\nevent$.subscribe((data) =\u003e { // read data\n  console.log(data.foo)\n});\n\nevent$.next({foo: 'bar'}); // send data\n\n// create observables for events that you want to only listen (receive data)\nconst event$ = socket.observable('event_name'); // get rxjs/Observable for a specific event\n\nevent$.subscribe((data) =\u003e { // read data\n  console.log(data.foo)\n});\n```\n\n### Generics\n\nIf you are using typescript, it's best to use generic types\n```typescript\n// all observables and subject that are generated will emit/subscribe an object with string `foo` property\nconst socket = new RxSocket\u003c{ foo: strig }\u003e('/url/to/socket.io/server');\n\n// unless type is given to the class methods when they are called.\n// like below:\nsocket.subject\u003cstring\u003e('event_name');\nsocket.observable\u003cobject\u003e('event_name');\n\n```\n\n\n[See tests for more detailed and up to date examples](./src/index.spec.ts)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharunurhan%2Frx-socket.io-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharunurhan%2Frx-socket.io-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharunurhan%2Frx-socket.io-client/lists"}