Instance Method

filter(_:)

Republishes all elements that match a provided closure.

Declaration

func filter(_ isIncluded: @escaping (Upstream.Output) -> Bool) -> Publishers.Filter<Publishers.SubscribeOn<Upstream, Context>>

Parameters

isIncluded

A closure that takes one element and returns a Boolean value indicating whether to republish the element.

Return Value

A publisher that republishes all elements that satisfy the closure.