Latest 0.3.0
Homepage https://github.com/sunshinejr/RxShortcuts
License MIT
Platforms ios 8.0
Authors

CocoaPods
Swift 3.0.x
License
Platform

Shortcuts for RxSwift/RxCocoa.

Warning! Since RxSwift 3.0.0 (and Swift 3.0), shortcuts like subscribeNext,
doOnNext etc. have been removed from the core library. There was a reason for
that and let me quote @kzaher about the shortcuts
(old extensions):

The downsides of old extensions were inconsistencies with Swift API guidelines.
They also weren’t expressing that calling them actually performes additional
subscriptions and thus potentially additional work beside just registering
observers.

However I really like these shortcuts and I’m using them in my projects anyways,
so I though that I would share.

Shortcuts

List of available shortcuts for RxSwift:

subscribeNext(_:)
subscribeError(_:)
subscribeCompleted(_:)

doOnNext(_:)
doOnError(_:)
doOnCompleted(_:)

[Observable.just(1)].merge()
[Observable.just(1)].concat()
[Observable.just(1)].zip(_:)
[Observable.just(1)].combineLatest(_:)

List of available shortcuts for RxCocoa (and Driver):

driveNext(_:)
driveCompleted(_:)

doOnNext(_:)
doOnCompleted(_:)

If you think that there should be more, please make an
Issue or Pull Request.

Example

To run the example project, clone the repo, and run pod install from the
Example directory first.

Requirements

  • RxSwift ~> 3.0.0

Installation

If you want the shortcuts only for RxSwift, add the following line to Podfile:

pod "RxShortcuts"

If you want the shortcuts for both RxSwift and RxCocoa, then add this line:

pod "RxShortcuts/RxCocoa"

Author

Sunshinejr, [email protected], @thesunshinejr

License

RxShortcuts is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "RxShortcuts",
    "version": "0.3.0",
    "summary": "RxSwift/RxCocoa shortcuts. subscribeNext, doOnNext and more.",
    "description": "Shortcuts for [RxSwift/RxCocoa](https://github.com/ReactiveX/RxSwift).",
    "homepage": "https://github.com/sunshinejr/RxShortcuts",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "u0141ukasz Mru00f3z": "[email protected]"
    },
    "source": {
        "git": "https://github.com/sunshinejr/RxShortcuts.git",
        "tag": "0.3.0"
    },
    "social_media_url": "https://twitter.com/thesunshinejr",
    "platforms": {
        "ios": "8.0"
    },
    "default_subspecs": "Core",
    "pushed_with_swift_version": "3.0",
    "subspecs": [
        {
            "name": "Core",
            "source_files": "RxShortcuts/RxSwift/*.swift",
            "dependencies": {
                "RxSwift": [
                    "~> 3.0"
                ]
            }
        },
        {
            "name": "RxCocoa",
            "source_files": "RxShortcuts/RxCocoa/*.swift",
            "dependencies": {
                "RxShortcuts/Core": [],
                "RxCocoa": [
                    "~> 3.0"
                ]
            }
        }
    ]
}

Pin It on Pinterest

Share This