Set and get strings

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
RMidhunSuresh 2021-08-11 17:14:17 +05:30
parent e424293293
commit daeeaa2869

View file

@ -43,6 +43,14 @@ export class SettingsStorage {
return defaultValue; return defaultValue;
} }
async setString(key, value) {
this._set(key, value);
}
async getString(key) {
return window.localStorage.getItem(`${this._prefix}${key}`);
}
async remove(key) { async remove(key) {
window.localStorage.removeItem(`${this._prefix}${key}`); window.localStorage.removeItem(`${this._prefix}${key}`);
} }