Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

vent.register({ ... }) for passing in a map of events #21

Open
crobinson42 opened this issue Apr 20, 2017 · 0 comments
Open

vent.register({ ... }) for passing in a map of events #21

crobinson42 opened this issue Apr 20, 2017 · 0 comments
Labels
Milestone

Comments

@crobinson42
Copy link
Owner

Use case

const eventMap = {
  'event1': this.event1Handler,
  'event2': this.event2Handler,
}

const ventIdList = vent.register(eventMap)

console.log(ventIdList) // [eventId1, eventId2] 

vent.off(eventMap)
// or
ventIdList.forEach(vent.off)
// or 
vent.off.all(ventIdList)
@crobinson42 crobinson42 added this to the v1 milestone Apr 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant