Skip to content
Advertisement

Tag: eventemitter

Allow only certain events

Is there a way to only allow certain events in a custom eventEmitter? For example, if I have something like this everything works as expected: I get a callback every second on the first event and every 2 seconds on the 2nd event. For the 3rd nothing happens, because I don’t emit this event. Is there a way that this

Advertisement