ndb: more id transition helpers
This commit is contained in:
1 parent
ff20cc4767
commit
a08d0a5a19
1 file changed
+15
@@ -12,3 +12,18 @@ typealias FollowRef = ReferencedId
|
||||
typealias Pubkey = String
|
||||
typealias NoteId = String
|
||||
typealias Privkey = String
|
||||
|
||||
extension String {
|
||||
// Id constructors
|
||||
init?(hex: String) {
|
||||
self = hex
|
||||
}
|
||||
|
||||
static var empty: String {
|
||||
return ""
|
||||
}
|
||||
|
||||
func hex() -> String {
|
||||
return self
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user