Swiftpack.co - ReactorKit/WeakMapTable as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by ReactorKit.
ReactorKit/WeakMapTable 1.2.1
A weak-to-strong map table
⭐️ 36
🕓 2 years ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/ReactorKit/WeakMapTable.git", from: "1.2.1")

WeakMapTable

Swift CocoaPods Build Status CodeCov

A weak-to-strong map table. It is inspired by NSMapTable but guarantees thread safety and deals better with weak references. NSMapTable.weakToStrongObjects() doesn't free the value object when the key object is deallocated but WeakMapTable does.

APIs

public func value(forKey key: Key) -> Value?
public func value(forKey key: Key, default: @autoclosure () -> Value) -> Value
public func forceCastedValue<T>(forKey key: Key, default: @autoclosure () -> T) -> T
public func setValue(_ value: Value?, forKey key: Key)

Installation

Podfile

pod 'WeakMapTable'

License

WeakMapTable is under MIT license. See the LICENSE file for more info.

GitHub

link
Stars: 36
Last commit: 1 year ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

1.2.1
2 years ago
  • Update iOS deployment target to be compatible with XCode 12

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