Popularity
1.3
Stable
Activity
0.0
Stable
43
2
3

Code Quality Rank: L5
Programming language: Swift
License: MIT License
Tags: Code Quality    
Latest version: v0.2.0

Fallback alternatives and similar libraries

Based on the "Code Quality" category.
Alternatively, view Fallback alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of Fallback or a related project?

Add another 'Code Quality' Library

README

Fallback

Swift Build Status CocoaPods Carthage compatible

Syntactic sugar for Swift do-try-catch.

At a Glance

value = try fallback(
  try get("A"),
  try get("B"),
  try get("C"),
  try get("D")
)

is equivalent to:

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

Installation

  • Using CocoaPods:

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

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

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

License

Fallback is under MIT license. See the [LICENSE](LICENSE) file for more info.


*Note that all licence references and agreements mentioned in the Fallback README section above are relevant to that project's source code only.