Swiftpack.co - RougeWare/Swift-Optional-Tools as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by RougeWare.
RougeWare/Swift-Optional-Tools 1.1.3
Some tools to make Optionals easier to use
⭐️ 0
🕓 3 years ago
.package(url: "https://github.com/RougeWare/Swift-Optional-Tools.git", from: "1.1.3")

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())

GitHub

link
Stars: 0
Last commit: 3 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

1.1.3 - Operators for Optionals
3 years ago

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

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics