Fact improvements & helpers
-
Add FactType
enum model with known (.username
,.email
,.phone
) and unknown (.other(Int)
) types of facts. -
Update Fact
model properties:-
type: Int
→type: FactType
-
fact: String
→value: String
-
-
Add convenience extensions to [Fact]
array:func get(_ type: FactType) -> Fact?
func set(_ type: FactType, _ value: String?)
-
Add convenience extensions to Contact
model:func getFact(_ type: FactType) throws -> Fact?
mutating func setFact(_ type: FactType, _ value: String?) throws
Edited by Dariusz Rybicki