{"id":24499625,"url":"https://github.com/codewithkyle/pubsub","last_synced_at":"2026-07-13T05:31:46.156Z","repository":{"id":111440833,"uuid":"344207919","full_name":"codewithkyle/pubsub","owner":"codewithkyle","description":"A tiny Pub/Sub library.","archived":false,"fork":false,"pushed_at":"2021-05-01T10:54:04.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-25T08:39:15.283Z","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/codewithkyle.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-03-03T17:27:56.000Z","updated_at":"2022-01-02T17:29:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"14f184ba-ffc5-43bf-ba66-75cbc9e78edc","html_url":"https://github.com/codewithkyle/pubsub","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/codewithkyle/pubsub","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithkyle%2Fpubsub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithkyle%2Fpubsub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithkyle%2Fpubsub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithkyle%2Fpubsub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codewithkyle","download_url":"https://codeload.github.com/codewithkyle/pubsub/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithkyle%2Fpubsub/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35412244,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-13T02:00:06.543Z","response_time":119,"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":"2025-01-21T22:15:10.326Z","updated_at":"2026-07-13T05:31:46.151Z","avatar_url":"https://github.com/codewithkyle.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PubSub\n\nA lightweight (1kb) pubsub JavaScript library.\n\n## Installation\n\nInstall via NPM\n\n```bash\nnpm i -S @codewithkyle/pubsub\n```\n\nInstall via CDN\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/@codewithkyle/pubsub@1/pubsub.min.js\"\u003e\u003c/script\u003e\n```\n\n```javascript\nimport { EventBus, createSubscription, destroySubscription, publish, subscribe, unsubscribe } from \"https://cdn.jsdelivr.net/npm/@codewithkyle/pubsub@1/pubsub.min.mjs\";\n```\n\n## Usage\n\n### ES Modules\n\n```typescript\nimport { createSubscription, destroySubscription, publish, subscribe, unsubscribe } from \"https://cdn.jsdelivr.net/npm/@codewithkyle/pubsub@1/pubsub.min.mjs\";\nconst ticket = createSubscription();\nconst inbox = (data:any) =\u003e {\n    console.log(data);\n};\nconst inboxId = subscribe(ticket, inbox);\nsetTimeout(()=\u003e{\n    publish(ticket, \"Hello world\");\n}, 1000);\n```\n\n### Vanilla JS\n\n```javascript\nconst ticket = EventBus.createSubscription();\nconst inbox = (data:any) =\u003e {\n    console.log(data);\n};\nconst inboxId = EventBus.subscribe(ticket, inbox);\nsetTimeout(()=\u003e{\n    EventBus.publish(ticket, \"Hello world\");\n}, 1000);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewithkyle%2Fpubsub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodewithkyle%2Fpubsub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewithkyle%2Fpubsub/lists"}