OptionalTools

1.1.3

Some tools to make Optionals easier to use
RougeWare/Swift-Optional-Tools

What's New

1.1.3 - Operators for Optionals

2020-06-21T07:23:23Z

Added three new operators:

  • -? - If both have values, performs left - right. Otherwise, returns nil
  • +? - If both have values, performs left + right. Otherwise, returns nil
  • =? - If the right has a value, performs left = right. Otherwise, does nothing

Patch Changes

  • 1.1.3
    • Added a dynamic library product whose name is a valid bundle identifier
    • Deprecated previous dynamic library product because its name caused problems when submitting to the App Store
  • 1.1.2
    • Added alternative dynamic library product
  • 1.1.1
    • Added dual licenses

Swift Optional Tools

Some tools to make Optionals easier to use

Examples

Unwrap or throw an error

let image = try UIImage(named: "My Image").unwrappedOrThrow()
let color = try UIColor(named: "My Color").unwrappedOrThrow(error: ColorNotFoundError())

Description

  • Swift Tools 5.1.0
View More Packages from this Author

Dependencies

  • None
Last updated: Sat Oct 19 2024 15:24:40 GMT-0900 (Hawaii-Aleutian Daylight Time)