{"id":22959726,"url":"https://github.com/littensy/event-emitter","last_synced_at":"2025-04-02T02:29:24.628Z","repository":{"id":47636616,"uuid":"393860231","full_name":"littensy/event-emitter","owner":"littensy","description":"Event emitter for roblox-ts","archived":false,"fork":false,"pushed_at":"2022-11-11T21:35:53.000Z","size":219,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-07T17:37:10.710Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","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/littensy.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":"2021-08-08T04:49:59.000Z","updated_at":"2022-10-23T01:22:17.000Z","dependencies_parsed_at":"2023-01-21T12:31:14.312Z","dependency_job_id":null,"html_url":"https://github.com/littensy/event-emitter","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/littensy%2Fevent-emitter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/littensy%2Fevent-emitter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/littensy%2Fevent-emitter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/littensy%2Fevent-emitter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/littensy","download_url":"https://codeload.github.com/littensy/event-emitter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246743262,"owners_count":20826499,"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-14T18:28:23.807Z","updated_at":"2025-04-02T02:29:24.602Z","avatar_url":"https://github.com/littensy.png","language":"Lua","readme":"# @rbxts/task-event-emitter\n\nEvent emitter for roblox-ts using [stravant's GoodSignal class](https://devforum.roblox.com/t/lua-signal-class-comparison-optimal-goodsignal-class/1387063).\n\n## Installation\n\n```\nnpm i @rbxts/task-event-emitter\n```\n\n## Usage\n\nCreate an EventEmitter with an array of parameters:\n\n```ts\nconst emitter = new EventEmitter\u003c[player: Player]\u003e(janitor);\n```\n\nOr, wrap an existing Roblox event:\n\n```ts\nconst onChildAdded = EventEmitter.wrap(object.ChildAdded, janitor);\n```\n\n## Example\n\n```ts\nimport EventEmitter from \"@rbxts/task-event-emitter\";\n\nconst onChange = new EventEmitter\u003c[property: string]\u003e();\n\nonChange.subscribe((property) =\u003e print(`Property ${property} changed!`));\n\nonChange.emit(\"Name\");\n```\n\n```ts\nimport EventEmitter from \"@rbxts/task-event-emitter\";\n\nconst emitter = new EventEmitter();\n\nconst subscription = emitter.subscribe(() =\u003e {});\n\nif (!subscription.closed) {\n\tsubscription.unsubscribe();\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flittensy%2Fevent-emitter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flittensy%2Fevent-emitter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flittensy%2Fevent-emitter/lists"}