Swiftpack.co -  erica/Swift-General-Utility as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
erica/Swift-General-Utility
General utility types and functionality
.package(url: "https://github.com/erica/Swift-General-Utility.git", from: "0.0.7")

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

  • Partition split.

Result utility

  • Initializes a Result from a completion handler's (data?, error?).

String utility

  • Trim a string

Installation

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"),
        ],
    ),
],

GitHub

link
Stars: 12
Last commit: 4 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

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