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.11.4
Data container that allows to store exactly one instance of any given type.
⭐️ 0
🕓 6 days ago
iOS macOS
.package(url: "https://github.com/XCEssentials/ByTypeStorage.git", from: "3.11.4")

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: 6 days ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

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