{"id":19848170,"url":"https://github.com/mys1024/signaling-peer-js","last_synced_at":"2025-10-08T01:57:20.928Z","repository":{"id":111918700,"uuid":"609756833","full_name":"mys1024/signaling-peer-js","owner":"mys1024","description":"A JavaScript peer-side library of Signaling.","archived":false,"fork":false,"pushed_at":"2023-03-10T14:08:11.000Z","size":70,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-08T01:57:20.536Z","etag":null,"topics":[],"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/mys1024.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":"2023-03-05T06:10:21.000Z","updated_at":"2023-03-06T15:56:46.000Z","dependencies_parsed_at":"2023-07-08T22:45:51.165Z","dependency_job_id":null,"html_url":"https://github.com/mys1024/signaling-peer-js","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":"mys1024/starter-node","purl":"pkg:github/mys1024/signaling-peer-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mys1024%2Fsignaling-peer-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mys1024%2Fsignaling-peer-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mys1024%2Fsignaling-peer-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mys1024%2Fsignaling-peer-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mys1024","download_url":"https://codeload.github.com/mys1024/signaling-peer-js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mys1024%2Fsignaling-peer-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278877086,"owners_count":26061380,"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-07T02:00:06.786Z","response_time":59,"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-11-12T13:16:24.731Z","updated_at":"2025-10-08T01:57:20.922Z","avatar_url":"https://github.com/mys1024.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# signaling-peer-js\n\nA JavaScript peer-side library of [Signaling](https://github.com/mys1024/signaling).\n\n## Install\n\n```shell\nnpm i signaling-peer-js\n```\n\n## Import\n\n```javascript\n// for runtimes with WebSocket defined (e.g. Browser, Deno):\nimport { SignalingPeer } from 'signaling-peer-js'\n// for Node.js:\nimport { SignalingPeer } from 'signaling-peer-js/node'\n```\n\n## Usage\n\n```javascript\nconst signalingAgentAddr = 'ws://127.0.0.1/ws'\n\nconst peer1 = new SignalingPeer(signalingAgentAddr)\nconst pid1 = await peer1.getPid()\npeer1.addDataSignalListener(({ from, data }) =\u003e {\n  console.log(`peer1 recv from ${from}:`, data)\n})\n\nconst peer2 = new SignalingPeer(signalingAgentAddr)\nconst pid2 = await peer2.getPid()\npeer2.addDataSignalListener(({ from, data }) =\u003e {\n  console.log(`peer2 recv from ${from}:`, data)\n})\n\nawait peer1.send(pid2, 'Hello!')\nawait peer2.send(pid1, 'Hi!')\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmys1024%2Fsignaling-peer-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmys1024%2Fsignaling-peer-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmys1024%2Fsignaling-peer-js/lists"}