IdbStorage is a fairly lightweight wrapper around IdbKeyVal. IdbKeyVal exposes generic get and set methods whereas IdbStorage can only get and set strings. This seems like an unnecessary restriction and means developers must come up with hacky solutions to work with types other than strings, eg. CryptoKeyPair.
How Has This Been Tested?
I have tested this with a local deployment of OpenChat where it has successfully stored and retrieved values of type string and CryptoKeyPair.
Description
IdbStorage
is a fairly lightweight wrapper aroundIdbKeyVal
.IdbKeyVal
exposes genericget
andset
methods whereasIdbStorage
can onlyget
andset
strings. This seems like an unnecessary restriction and means developers must come up with hacky solutions to work with types other than strings, eg.CryptoKeyPair
.How Has This Been Tested?
I have tested this with a local deployment of OpenChat where it has successfully stored and retrieved values of type string and CryptoKeyPair.
Checklist: