Swiftpack.co - XCEssentials/ByTypeStorage as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by XCEssentials.
XCEssentials/ByTypeStorage 3.12.0
Data container that allows to store exactly one instance of any given type.
⭐️ 0
🕓 2 years ago
iOS macOS
.package(url: "https://github.com/XCEssentials/ByTypeStorage.git", from: "3.12.0")

GitHub License GitHub Tag Swift Package Manager Compatible Carthage Compatible Written in Swift Supported platforms Build Status

ByTypeStorage

Data container that allows to store exactly one instance of any given type

How it works

It's Dictionary-like (and Dictionary-based) key-value storage where key is derived from a type provided. Internally keys are just strings generated from a given value type full name (that includes module name, and all parent types in case of nested types). This feature allows to avoid the need of hard-coded string-based keys, improves type-safety, simplifies usage. Obviously, this data container is supposed to be used with custom data types that have some domain-specific semantics in their names and every value associated with this type supposed to be unique within each given storage.

GitHub

link
Stars: 0
Last commit: 2 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

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