Skip to content
This repository was archived by the owner on Mar 29, 2019. It is now read-only.

Repository files navigation

Fallback

SwiftBuild StatusCocoaPodsCarthage compatible

Syntactic sugar for Swift do-try-catch.

At a Glance

value =tryfallback(tryget("A"),tryget("B"),tryget("C"),tryget("D"))

is equivalent to:

do{
value =tryget("A")}catch{do{
value =tryget("B")}catch{do{
value =tryget("C")}catch{
value =tryget("D")}}}

Installation

  • Using CocoaPods:

    pod'Fallback','~> 0.2'
  • Using Carthage:

    github "devxoul/Fallback" ~> 0.2
    
  • Using Swift Package Manager:

    import PackageDescription
    letpackage=Package(
    name:"MyAwesomeProject",
    targets:[],
    dependencies:[.Package(url:"https://github.com/devxoul/Fallback.git", majorVersion:0)])

License

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

About

💊 Syntactic sugar for Swift do-try-catch

Resources

Stars

43 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages