{"id":24367147,"url":"https://github.com/joepdooper/callbackhooks","last_synced_at":"2026-03-07T13:02:51.316Z","repository":{"id":271036844,"uuid":"912222582","full_name":"joepdooper/callbackhooks","owner":"joepdooper","description":"A lightweight and flexible callback utility for JavaScript. Easily add, organize, and execute callback functions.","archived":false,"fork":false,"pushed_at":"2025-05-11T09:03:52.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-19T16:36:57.532Z","etag":null,"topics":["async-callback","callback","callbacks","custom-callback","event","event-driven","event-handling","events","function-hooks","hook","hooks","javascript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/joepdooper.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":"2025-01-05T00:24:25.000Z","updated_at":"2025-05-11T09:03:55.000Z","dependencies_parsed_at":"2025-03-12T10:21:00.981Z","dependency_job_id":null,"html_url":"https://github.com/joepdooper/callbackhooks","commit_stats":null,"previous_names":["joepdooper/callbackhooks","joepdooper/callbackmanager"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/joepdooper/callbackhooks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joepdooper%2Fcallbackhooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joepdooper%2Fcallbackhooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joepdooper%2Fcallbackhooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joepdooper%2Fcallbackhooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joepdooper","download_url":"https://codeload.github.com/joepdooper/callbackhooks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joepdooper%2Fcallbackhooks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30214618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T12:15:00.571Z","status":"ssl_error","status_checked_at":"2026-03-07T12:15:00.217Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["async-callback","callback","callbacks","custom-callback","event","event-driven","event-handling","events","function-hooks","hook","hooks","javascript"],"created_at":"2025-01-19T01:41:52.820Z","updated_at":"2026-03-07T13:02:51.311Z","avatar_url":"https://github.com/joepdooper.png","language":"JavaScript","readme":"# CallbackHooks\n\n**CallbackHooks** is a lightweight and flexible callback/event management library for JavaScript.  \nIt lets you easily add, organize, and execute callback functions tied to named events.\n\n## Installation\n\nInstall via npm:\n\n```bash\nnpm install callbackhooks\n```\n\n## Usage\n\n```javascript\n// Import the CallbackHooks class\nimport { CallbackHooks } from 'callbackhooks';\n\n// Create a new instance of CallbackHooks\nconst hooks = new CallbackHooks();\n\n// Add a callback to an event named 'userLogin'\nhooks.add('userLogin', function(userData) {\nconsole.log('User logged in:', userData);\n});\n\n// Add a callback to an event named 'userLogout'\nhooks.add('userLogout', function() {\nconsole.log('User logged out');\n});\n\n// Call the 'userLogin' event with parameters (user data)\nhooks.call('userLogin', { name: 'Joe', age: 30 });\n\n// Call the 'userLogout' event (no parameters needed)\nhooks.call('userLogout');\n```\n\n## Example Use Cases\n\n- Plugin systems\n- Event-driven modules\n- Custom event handling in apps\n- Decoupled function execution","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoepdooper%2Fcallbackhooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoepdooper%2Fcallbackhooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoepdooper%2Fcallbackhooks/lists"}