8000 GitHub - RACCommunity/Rex at v0.2
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ReactiveCocoa Extensions

License

Notifications You must be signed in to change notification settings

RACCommunity/Rex

Repository files navigation

Rex Carthage compatible

Extensions for ReactiveCocoa that may not fit in the core framework.

Signal

All Signal operators can also be lifted toSignalProducer.

filterMap

Applies transform to values from signal with non-nil results unwrapped and forwared on the returned signal. This is equivalent to map { … } |> filter { $0 != nil } |> map { $0! } but without creating extra intermediate signals.

func filterMap<T, U, E>(transform: T -> U?)(signal: Signal<T, E>) -> Signal<U, E>
ignoreError

Wraps a signal in a version that drops Error events. By default errors are replaced with a Completed event but Interrupted can also be specified as replacement.

func ignoreError<T, E>(signal: Signal<T, E>) -> Signal<T, NoError>
func ignoreError<T, E>(#replacement: Event<T, NoError>)(signal: Signal<T, E>) -> Signal<T, NoError>
uncollect

Flattens batches of elements sent on signal into each individual element. The inverse of collect.

func uncollect<S: SequenceType, E>(signal: Signal<S, E>) -> Signal<S.Generator.Element, E>

SignalProducer

Operators specific to SignalProducer.

groupBy

Partitions values from producer into new producer groups based on the key returned from grouping. Termination events on the original producer are forwarded to each inner producer group.

func groupBy<K: Hashable, T, E>(grouping: T -> K)(producer: SignalProducer<T, E>)
  -> SignalProducer<(K, SignalProducer<T, E>), E>

License

Rex is released under the MIT license

About

ReactiveCocoa Extensions

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 21

Languages

0