EXTENSION

ObservableType

Methods

filterOne(_:)

public func filterOne(_ condition: @escaping (Element) -> Bool) -> Observable<Element>

Take the first element that matches the filter function.

Parameters

Name Description
fn Filter closure.

filter(_:)

public func filter(_ keyPath: KeyPath<Element, Bool>) -> Observable<Element>

map(_:)

public func map<T>(_ keyPath: KeyPath<Element, T>) -> Observable<T>

one()

public func one() -> Observable<Element>

skippingCurrent()

public func skippingCurrent() -> Observable<Element>

select(_:)

public func select<T: OptionalType>(_ keyPath: KeyPath<Element, T>) -> Observable<T.Wrapped> where T.Wrapped: Equatable

Selects a property component from an Element filtering nil and emitting only distinct contiguous elements.

filterNil()

Unwraps and filters out nil elements.

withStateChanges(in:that:)

public func withStateChanges<T>(in stateComponent: KeyPath<Element, T>, that componentProperty: KeyPath<T, Bool>) -> Observable<T>

Maps from a StateType property to create an Observable that contains the filtered property and all its changes.