Cleanup
Support code for developing Swift code.
A Utility namespace for hosting utility functionality withing your app.
Utility
Inline functional Applicative protocol that supports applying a closure to an instance, returning the instance.
Applicative
Note: Types must conform to the protocol to inherit the behavior, as non-nominal types like Any cannot be extended.
Any
A stringity error type representing runtime errors.
Enables debugging within method chains and condition cascades.
Request synchronous data using URLSession.
URLSession
Result
(data?, error?)
PROJECT > Swift Packages > Install:
https://github.com/erica/https://github.com/erica/Swift-General-Utility
SwiftPM:
dependencies: [ .package(url: "https://github.com/erica/Swift-General-Utility", from: "x.x.x"), // replace with version ], targets: [ .target( name: "TARGET-NAME", dependencies: [ .product(name: "GeneralUtility", package: "Swift-General-Utility"), ], ), ],
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
Swift General Utility
Support code for developing Swift code.
Contents
Utility
A
Utility
namespace for hosting utility functionality withing your app.Applicative
Inline functional
Applicative
protocol that supports applying a closure to an instance, returning the instance.Note: Types must conform to the protocol to inherit the behavior, as non-nominal types like
Any
cannot be extended.RuntimeError
A stringity error type representing runtime errors.
Side effect utility
Enables debugging within method chains and condition cascades.
SynchronousData
Request synchronous data using
URLSession
.Type Utilities
Collection utility
Result utility
Result
from a completion handler’s(data?, error?)
.String utility
Installation
PROJECT > Swift Packages > Install:
SwiftPM: