Instance Method

drop(while:)

Omits elements from the upstream publisher until a given closure returns false, before republishing all remaining elements.

Declaration

func drop(while predicate: @escaping ((Output0, Output1)) -> Bool) -> Publishers.DropWhile<Publishers.MapKeyPath2<Upstream, Output0, Output1>>

Parameters

predicate

A closure that takes an element as a parameter and returns a Boolean value indicating whether to drop the element from the publisher’s output.

Return Value

A publisher that skips over elements until the provided closure returns false.