Filter events based on a predicate function
The event type to filter
Function to test each event
Callback for events that pass the filter
Unsubscribe function
Filter events based on a predicate function