Multi-platform Swift shared code module with useful extension methods on standard library types.
The library has full unit test coverage and is actively used in production.
-
Add the package to your Xcode project using Swift Package Manager using
https://github.com/orchetect/swift-extensionsas the URL. -
Import the module files where needed. It's recommended to use the
internalaccess level if used in a package so that it is not exported to the user of your package.internal import SwiftExtensions
In your Package.swift file:
let package = Package(
dependencies: [
.package(url: "https://github.com/orchetect/swift-extensions", from: "2.0.0")
],
targets: [
.target(
dependencies: [
.product(name: "SwiftExtensions", package: "swift-extensions")
]
)
]
)Most methods are implemented as category methods so they are generally discoverable.
All methods are documented with inline help explaining their purpose and basic usage examples.
Coded by a bunch of 🐹 hamsters in a trenchcoat that calls itself @orchetect.
Licensed under the MIT license. See LICENSE for details.
Please do not email maintainers for technical support. Several options are available for issues and questions:
- Questions and feature ideas can be posted to Discussions.
- If an issue is a verifiable bug with reproducible steps it may be posted in Issues.
Contributions are welcome. Posting in Discussions first prior to new submitting PRs for features or modifications is encouraged.
This repository was formerly known as OTCore.