Skip to content

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

License

Notifications You must be signed in to change notification settings

XCEssentials/ByTypeStorage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages