{"id":21425052,"url":"https://github.com/betterwrite/vue-pubsub","last_synced_at":"2025-08-28T09:14:04.343Z","repository":{"id":149283611,"uuid":"621371522","full_name":"betterwrite/vue-pubsub","owner":"betterwrite","description":"A Pubsub Plugin (or better Event Bus) for Vue.","archived":false,"fork":false,"pushed_at":"2025-08-20T23:18:54.000Z","size":42,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-20T23:32:21.783Z","etag":null,"topics":["event-bus","mitt","pubsub","typescript","vue","vue3","vuejs"],"latest_commit_sha":null,"homepage":"","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/betterwrite.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2023-03-30T14:26:55.000Z","updated_at":"2025-08-20T23:18:56.000Z","dependencies_parsed_at":"2023-06-10T09:15:27.760Z","dependency_job_id":null,"html_url":"https://github.com/betterwrite/vue-pubsub","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/betterwrite/vue-pubsub","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/betterwrite%2Fvue-pubsub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/betterwrite%2Fvue-pubsub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/betterwrite%2Fvue-pubsub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/betterwrite%2Fvue-pubsub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/betterwrite","download_url":"https://codeload.github.com/betterwrite/vue-pubsub/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/betterwrite%2Fvue-pubsub/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272475561,"owners_count":24940719,"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-28T02:00:10.768Z","response_time":74,"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":["event-bus","mitt","pubsub","typescript","vue","vue3","vuejs"],"created_at":"2024-11-22T21:26:33.885Z","updated_at":"2025-08-28T09:14:04.321Z","avatar_url":"https://github.com/betterwrite.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vue Pubsub\n\nA Pubsub Plugin (or better Event Bus) for Vue, inspired in [mitt](https://github.com/developit/mitt)\n\n### Use\n\n`npm i vue-pubsub`\n\n```typescript\nimport { createApp } from \"vue\";\nimport { PubsubPlugin } from \"vue-pubsub\";\nimport App from \"./App.vue\";\n\nconst app = createApp(App);\n\napp.use(PubsubPlugin());\napp.mount(\"#app\");\n\n// ...\n\n\u003cscript setup\u003e\nimport { usePubsub } from \"vue-pubsub\";\n\nconst pubsub = usePubsub();\n\npubsub.on(\"test\", (data) =\u003e {\n  console.log(data);\n});\n\u003c/script\u003e\n\n// in other .vue file / setup hook\npubsub.to(\"test\", \"Hello World!\");\n```\n\n### Using with Typescript\n\nYou can declare custom channel types by:\n\n```typescript\ndeclare module \"vue-pubsub\" {\n  interface Channels {\n    test: string;\n  }\n}\n```\n\n\u003e Vue inject() and provide() do not support generic types in same context. Better suggestions for this are welcome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbetterwrite%2Fvue-pubsub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbetterwrite%2Fvue-pubsub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbetterwrite%2Fvue-pubsub/lists"}