Protocol attached to Optional and NSNull which allows developers to check if an object is nil or not. This is good when working with type of Any like in Mirror, or Dictionaries where optional and NSNull types can be stored in Any
let properties: [String: Any] = [...]
for (k,v) in properties {
if let vO = v as? Nillable, !vO.isRootNil {
//Get the root value, escaping all optionals
let rValue = vO.unsafeRootUnwrap
}
}
- Tyler Anger - Initial work - TheAngryDarling
This project is licensed under Apache License v2.0 - see the LICENSE.md file for details