Skip to content

1.0.1

Latest

Choose a tag to compare

@gchriswill gchriswill released this 13 Jun 00:14
· 3 commits to main since this release
0cab1a2

Release Notes 1.0.1

What’s New

  • Introduced orEmpty, orZero, orTrue, and orFalse for common Optional defaults.
  • Added generic fallback support with or(_:) for any optional value.
  • Added Or.this(optional:default:) for explicit, type-safe default handling.
  • Support covers StringProtocol, Bool, Numeric, and Collection optionals.
  • Included tests for strings, booleans, numeric types, collections, and custom value/reference types.

Why It Matters

OrSwift reduces repetitive nil handling and makes fallback intent obvious at the call site. The API stays small and predictable, which keeps adoption simple in existing Swift codebases.

Installation

dependencies: [
    .package(url: "https://github.com/gchriswill/OrSwift.git", from: "1.0.1")
]

Notes

  • Swift Tools 5.10 required.
  • Distributed under the MIT License.

Full Changelog: https://github.com/gchriswill/OrSwift/commits/1.0.1