Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[feature request] multiple callbacks for an event #58

Open
Andarist opened this issue Mar 22, 2018 · 1 comment
Open

[feature request] multiple callbacks for an event #58

Andarist opened this issue Mar 22, 2018 · 1 comment

Comments

@Andarist
Copy link
Contributor

At the moment it's only possible to setup a single callback for a given event type -

this.events[eventName] = callback

I think it's really convenient to hook into a single event from multiple places (therefore with multiple callbacks). Also it would be cool to have corresponding off method, but that's a separate issue.

If you think that would be a nice addition to the library I can add it quickly, I would just use extremely small mitt (<200 B) as underlaying emitter.

@yowainwright
Copy link
Contributor

@Andarist I'd love to see the PR! Thanks!!!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants