Releases: gchriswill/OrSwift
Releases · gchriswill/OrSwift
1.0.1
Release Notes 1.0.1
What’s New
- Introduced
orEmpty,orZero,orTrue, andorFalsefor 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