Calls the predicate function for each Push event of the given source, only passing through events whose value meet the condition specified by the predicate function.
Parameters
Parameter
Type
Description
predicate
1
(value:T, index:number)=>false
A function that accepts a value and an index. The filter method calls this function one time for each Push event of the given source. If and only if the function returns a truthy value, then the event will pass through.