mirror of
https://github.com/qvacua/vimr.git
synced 2024-11-28 11:35:35 +03:00
18 lines
315 B
Swift
18 lines
315 B
Swift
/**
|
|
* Tae Won Ha - http://taewon.de - @hataewon
|
|
* See LICENSE
|
|
*/
|
|
|
|
import Cocoa
|
|
import RxSwift
|
|
|
|
extension ObservableType {
|
|
|
|
func mapOmittingNil<R>(_ transform: @escaping (Self.E) throws -> R?) -> RxSwift.Observable<R> {
|
|
return self
|
|
.map(transform)
|
|
.filter { $0 != nil }
|
|
.map { $0! }
|
|
}
|
|
}
|