{"id":19357545,"url":"https://github.com/babiabeo/deko","last_synced_at":"2026-05-18T03:09:59.564Z","repository":{"id":225989488,"uuid":"766118873","full_name":"babiabeo/deko","owner":"babiabeo","description":"A simple WebSocket client for Deno","archived":false,"fork":false,"pushed_at":"2024-03-16T13:51:41.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T11:49:36.758Z","etag":null,"topics":["autobahn-testsuite","deno","rfc6455","websocket","websocket-client"],"latest_commit_sha":null,"homepage":"https://jsr.io/@babia/deko","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/babiabeo.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}},"created_at":"2024-03-02T11:47:32.000Z","updated_at":"2024-03-05T09:49:00.000Z","dependencies_parsed_at":"2024-03-16T15:22:38.284Z","dependency_job_id":"6b2432df-43e0-46d2-b8a9-f3e774819bba","html_url":"https://github.com/babiabeo/deko","commit_stats":null,"previous_names":["babiabeo/deko"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/babiabeo/deko","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babiabeo%2Fdeko","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babiabeo%2Fdeko/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babiabeo%2Fdeko/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babiabeo%2Fdeko/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/babiabeo","download_url":"https://codeload.github.com/babiabeo/deko/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babiabeo%2Fdeko/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266053824,"owners_count":23869496,"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":["autobahn-testsuite","deno","rfc6455","websocket","websocket-client"],"created_at":"2024-11-10T07:08:04.616Z","updated_at":"2025-10-11T04:23:30.712Z","avatar_url":"https://github.com/babiabeo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deko\n\n[![Built with the Deno Standard Library](https://raw.githubusercontent.com/denoland/deno_std/main/badge.svg)](https://deno.land/std)\n\n**_Deko_** is a simple WebSocket client for Deno.\n\n\u003e [!WARNING]\n\u003e If you want to connect WebSocket on browsers, use\n\u003e [`WebSocket`](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket)\n\u003e instead.\n\n## Features\n\n- [x] Easy to use.\n- [x] Supports custom headers.\n- [x] Passes the\n      [Autobahn testsuite](https://github.com/crossbario/autobahn-testsuite). [^report]\n- [x] Follows [RFC 6455](https://datatracker.ietf.org/doc/html/rfc6455)\n      WebSocket implementation.\n\n## Usage\n\nThis package is available on [jsr.io](https://jsr.io).\n\nUse `deno add` command to add this package to your project:\n\n```\ndeno add @babia/deko\n```\n\nThen, import it in your source file:\n\n```ts\nimport { Deko } from \"@babia/deko\";\n```\n\nOr use `jsr:` specifier if you want to use an install step.\n\n```ts\nimport { Deko } from \"jsr:@babia/deko@^0.1.2\";\n```\n\n## Examples\n\n#### Open event handle\n\n```ts\nimport { Deko, OpCode } from \"@babia/deko\";\n\nconst client = new Deko({ uri: \"websocket url goes here\" });\n\nclient.onOpen = () =\u003e {\n  console.log(\"Connected to WebSocket server!\");\n};\n\nawait client.connect();\n```\n\n#### Receives a text message from WebSocket server\n\n```ts\nimport { Deko, OpCode } from \"@babia/deko\";\n\nconst client = new Deko({ uri: \"websocket url goes here\" });\n\nclient.onMessage = (_, message) =\u003e {\n  if (message.opcode === OpCode.TextFrame) {\n    console.log(new TextDecoder().decode(message.payload));\n  }\n};\n\nawait client.connect();\n```\n\n#### Sends a message to WebSocket server\n\n```ts\nimport { Deko, OpCode } from \"@babia/deko\";\n\nconst client = new Deko({ uri: \"websocket url goes here\" });\n\nawait client.connect();\n\nsetTimeout(async () =\u003e {\n  await client.sendMessage(\"Hello World!\");\n}, 5000); // Sends message after 5 seconds\n```\n\n## License\n\nThis repository/package is under **MIT License**. See [LICENSE](./LICENSE).\n\n[^report]: https://babiabeo.github.io/autobahn/deko/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabiabeo%2Fdeko","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbabiabeo%2Fdeko","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabiabeo%2Fdeko/lists"}