WholesomeExtensions - A SPM package that provides some extensions that I like to use

Overview

WholesomeExtensions

This package includes some extensions that I like to use. You can find examples here and actual implementation is under /Sources folder. You can install this package via SPM.

You can find tests under /Tests

OptionalExtensions

///
/// Unwraps and returns value of optional property.
/// Returns default value if property is nil.
///
///     let integerValue: Int? = nil
///     let unwrappedValue = integerValue.unwrappedValue(defaultValue: 1)
///     print(unwrappedValue)
///     // prints 1
///
///     let integerValue: Int? = 5
///     let unwrappedValue = integerValue.unwrappedValue(defaultValue: 1)
///     print(unwrappedValue)
///     // prints 5
public func unwrappedValue(defaultValue: @autoclosure () -> Wrapped) -> Wrapped

ArrayExtensions

///
/// Returns value at givent index.
/// If index is not in range of array  returns nil
///
///     let intArray: [Int] = [1,2,3,4]
///     let value = intArray[safe: 2]
///     print(value)
///     //prints Optional(3)
///
///     let intArray: [Int] = [1,2,3,4]
///     let value = intArray[safe: 10]
///     print(value)
///     //prints nil
public subscript(safe index: Int) -> Element? 
///
///
/// Returns value at given index.
/// If index is not in range of array  returns given defaultValue
///
///     let intArray: [Int] = [1,2,3,4]
///     let value = intArray[safe: 2, default: 5]
///     print(value)
///     //prints 3
///
///     let intArray: [Int] = [1,2,3,4]
///     let value = intArray[safe: 10, default: 5]
///     print(value)
///     //prints 5
public subscript(safe index: Int, default defaultValue: @autoclosure () -> Element) -> Element
You might also like...
Use this package in order to ease up working with Combine URLSession.

Use this package in order to ease up working with Combine URLSession. We support working with Codable for all main HTTP methods GET, POST, PUT and DELETE. We also support MultipartUpload

BFKit-Swift is a collection of useful classes, structs and extensions to develop Apps faster.
BFKit-Swift is a collection of useful classes, structs and extensions to develop Apps faster.

Features • Classes and Extensions Compatibility • Requirements • Communication • Contributing • Installing and Usage • Documentation • Changelog • Exa

Extensions giving Swift's Codable API type inference super powers 🦸‍♂️🦹‍♀️
Extensions giving Swift's Codable API type inference super powers 🦸‍♂️🦹‍♀️

Welcome to Codextended — a suite of extensions that aims to make Swift’s Codable API easier to use by giving it type inference-powered capabilities an

A handy collection of more than 500 native Swift extensions to boost your productivity.

SwifterSwift is a collection of over 500 native Swift extensions, with handy methods, syntactic sugar, and performance improvements for wide range of

Handy Combine extensions on NSObject, including Set<AnyCancellable>.
Handy Combine extensions on NSObject, including SetAnyCancellable.

Storable Description If you're using Combine, you've probably encountered the following code more than a few times. class Object: NSObject { var c

🌤 Swift Combine extensions for asynchronous CloudKit record processing

Swift Combine extensions for asynchronous CloudKit record processing. Designed for simplicity.

Helpful extensions for iOS app development 🚀
Helpful extensions for iOS app development 🚀

ExtensionKit includes many extensions, from getting the user location with a deterministic Combine API to a shimmer loading animation, to keyboard notification updates, bottom sheet and much much more. Check out the docs below or install the library with SPM to try it out.

 Extendy - A set of useful string extensions.
Extendy - A set of useful string extensions.

Extendy A set of useful string extensions. Requirements iOS 11.0+ Swift 5+ Installation CocoaPods Extendy is available through CocoaPods. To install i

Extensions that allow you to work with optionals

RxOptionals Sometimes it happens that you need to bind to several optional binders or to an optional method (for example, when using weak). To do this

Owner
Fırat Yenidünya
software engineer @adessoTurkey, formerly @Accenture
Fırat Yenidünya
Enzyme is a spm package for the make easier development on iOS

Enzyme Enzyme is a spm package for the make easier development on iOS. Installation For the installation you just need to add the url of the project t

Ebubekir 2 Jan 20, 2022
macOS utility for converting fat-frameworks to SPM-compatible XCFramework with arm64-simulator support

xcframework-maker macOS utility for converting fat-frameworks to SPM-compatible XCFramework with arm64-simulator support. ?? Description make-xcframew

Dariusz Rybicki 312 Dec 22, 2022
A Swift package for rapid development using a collection of micro utility extensions for Standard Library, Foundation, and other native frameworks.

ZamzamKit ZamzamKit is a Swift package for rapid development using a collection of micro utility extensions for Standard Library, Foundation, and othe

Zamzam Inc. 261 Dec 15, 2022
SharkUtils is a collection of Swift extensions, handy methods and syntactical sugar that we use within our iOS projects at Gymshark.

SharkUtils is a collection of Swift extensions, handy methods and syntactical sugar that we use within our iOS projects at Gymshark.

Gymshark 1 Jul 6, 2021
Useful Swift code samples, extensions, functionalities and scripts to cherry-pick and use in your projects

SwiftyPick ?? ?? Useful Swift code samples, extensions, functionalities and scripts to cherry-pick and use in your projects. Purpose The idea behind t

Manu Herrera 19 May 12, 2022
An open source Instapaper clone that features apps and extensions that use native UI Components for Mac and iOS.

TODO: Screenshot outdated Hipstapaper - iOS and Mac Reading List App A macOS, iOS, and iPadOS app written 100% in SwiftUI. Hipstapaper is an app that

Jeffrey Bergier 51 Nov 15, 2022
Approximate is a Swift package that provides implementations of floating point comparisons for the Swift ecosystem

Approximate Approximate floating point equality comparisons for the Swift Programming Language. Introduction Approximate is a Swift package that provi

Christopher Blanchard 1 Jun 1, 2022
A simple swift package that provides a Swift Concurrency equivalent to `@Published`.

AsyncValue This is a simple package that provides a convenience property wrapper around AsyncStream that behaves almost identically to @Published. Ins

Brent Mifsud 33 Oct 3, 2022
Swift Package Manager plugin which runs ActionBuilder to create a Github Actions workflow for a swift package.

ActionBuilderPlugin A Swift Package Manager command which builds a Github Actions workflow for the current package. By default the workflow file will

Elegant Chaos 4 Jul 20, 2022
A Swift port of some of the original PersistentJXA projects by D00MFist

Persistent-Swift This repo is a Swift port of some of the original PersistentJXA projects by D00MFist (https://github.com/D00MFist/PersistentJXA). I p

Cedric Owens 25 Sep 27, 2022