tiny-emitter
tiny-emitter copied to clipboard
Is there any way to listen to all events irrespective to event name?
Using
React-native 0.57
Issue
- I want to listen to all the events without knowing the name of the event, is it possible?
- I want to cancel all the events, without individually passing the name of all the events in the emitter.off() function
Based on the source code https://github.com/scottcorgan/tiny-emitter/blob/master/dist/tinyemitter.js - there is no way to do it.
I'd be happen to get that merged if you open a PR!
There actually is. If you emit an event with undefined name, then all listeners will be notified.
Is this a bug or a feature? :-)