{"id":23250679,"url":"https://github.com/socker210/event-emitter","last_synced_at":"2025-04-06T02:15:01.172Z","repository":{"id":33861911,"uuid":"161597172","full_name":"socker210/event-emitter","owner":"socker210","description":"A simple event emitter","archived":false,"fork":false,"pushed_at":"2022-12-09T16:13:46.000Z","size":652,"stargazers_count":2,"open_issues_count":15,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T06:14:19.838Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/socker210.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}},"created_at":"2018-12-13T06:58:10.000Z","updated_at":"2019-07-25T08:36:45.000Z","dependencies_parsed_at":"2023-01-15T03:15:57.596Z","dependency_job_id":null,"html_url":"https://github.com/socker210/event-emitter","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socker210%2Fevent-emitter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socker210%2Fevent-emitter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socker210%2Fevent-emitter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/socker210%2Fevent-emitter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/socker210","download_url":"https://codeload.github.com/socker210/event-emitter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423522,"owners_count":20936626,"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-12-19T09:14:35.053Z","updated_at":"2025-04-06T02:15:01.147Z","avatar_url":"https://github.com/socker210.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Event emitter\n\nSimple event emitter like a node\n\n## Installation\n\nWith npm\n```\nnpm install @socker210/event-emitter\n```\n\nWith yarn\n```\nyarn add @socker210/event-emitter\n```\n\n## Usage\n\n```javascript\nconst EventEmitter = require('@socker210/event-emitter')\n\nconst eventEmitter = new EventEmitter()\n\nconst cb = () =\u003e console.log('callback')\n\n// Register event\neventEmitter.on('print', cb)\n\n// Execute event\neventEmitter.emit('print')\n\n// Check if event is registered\neventEmitter.hasEvent('print')\n\n// Check if event and callback is registered\neventEmitter.hasCallback('print', cb)\n\n// Remove callback\neventEmitter.off('print', cb)\n```\n\n## LICENSE\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocker210%2Fevent-emitter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsocker210%2Fevent-emitter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocker210%2Fevent-emitter/lists"}