{"id":21811546,"url":"https://github.com/dnbard/easyevents","last_synced_at":"2025-06-17T14:38:29.535Z","repository":{"id":13280475,"uuid":"15966140","full_name":"dnbard/EasyEvents","owner":"dnbard","description":"Simple publish/subscribe library for JavaScript","archived":false,"fork":false,"pushed_at":"2014-01-17T13:47:01.000Z","size":148,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-26T05:41:28.536Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/dnbard.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}},"created_at":"2014-01-16T11:36:47.000Z","updated_at":"2014-01-17T13:47:02.000Z","dependencies_parsed_at":"2022-09-06T04:02:37.681Z","dependency_job_id":null,"html_url":"https://github.com/dnbard/EasyEvents","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnbard%2FEasyEvents","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnbard%2FEasyEvents/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnbard%2FEasyEvents/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnbard%2FEasyEvents/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dnbard","download_url":"https://codeload.github.com/dnbard/EasyEvents/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244767798,"owners_count":20507110,"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":[],"created_at":"2024-11-27T13:45:22.660Z","updated_at":"2025-03-21T09:15:25.284Z","avatar_url":"https://github.com/dnbard.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"EasyEvents\n==========\n\nEasyEvents is free publish/subscribe library for JavaScript.\n\nKey features\n==========\n* Dependency free\n* All subscriber calls are asynchronous\n* Working in any browser or environment that support Javascript\n* Easy to use and understand\n* Small, less than 1kb minified\n\nExample\n==========\n```javascript\n// create a function to receive messages\nvar myFunc = function(event, data){\n  console.log(new Date() + ' Event with name \"' + event + '\" is triggered');\n};\n\n// subscribe function to message with name 'message-name'\n// method returns token that can be used to unsubscribe that function\nvar EVENT_TITLE = 'message-name';\nvar token = EasyEvents.subscribe(EVENT_TITLE, myFunc);\n\n// publish a message\nEasyEvents.publish(EVENT_TITLE);\n\n// or publish a message with some data attached to it\nEasyEvents.publish(EVENT_TITLE, {\n  msg: 'Hello, EasyEvents!'\n});\n\n// publish a message synchronously\n// use with caution and only if you know why your messages should be sent synchronously\nEasyEvents.publishSync(EVENT_TITLE);\n\n// unsubscribe from further messages by token\nEasyEvents.remove(token);\n// unsubscribe from further messages by event name\n// this method will remove all functions for that event\nEasyEvents.remove(EVENT_TITLE);\n\n//remove ALL subscriptions\nEasyEvents.removeAll();\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnbard%2Feasyevents","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdnbard%2Feasyevents","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnbard%2Feasyevents/lists"}