Swiftpack.co - Package - ReactorKit/WeakMapTable

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: 14

Dependencies

Used By

Total: 0

Releases

- 2020-10-11 09:05:53

  • Support for SPM in Xcode 12 (#1, @yusuga)

- 2020-01-20 08:32:41

  • Add forceCastedValue() (22c05e25462ea6e5bc90e75847aa1198c2d2c72f)

- 2020-01-20 08:23:36

Hello, world! 👋