Set and get strings
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
e424293293
commit
daeeaa2869
1 changed files with 8 additions and 0 deletions
|
@ -43,6 +43,14 @@ export class SettingsStorage {
|
|||
return defaultValue;
|
||||
}
|
||||
|
||||
async setString(key, value) {
|
||||
this._set(key, value);
|
||||
}
|
||||
|
||||
async getString(key) {
|
||||
return window.localStorage.getItem(`${this._prefix}${key}`);
|
||||
}
|
||||
|
||||
async remove(key) {
|
||||
window.localStorage.removeItem(`${this._prefix}${key}`);
|
||||
}
|
||||
|
|
Reference in a new issue