mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-06 09:20:43 +01:00
Implement has
for storage services (#328)
* Implement `has` for storage services * Update jslib
This commit is contained in:
parent
d9f6f34a06
commit
5a377f8ef9
2
jslib
2
jslib
@ -1 +1 @@
|
||||
Subproject commit fdc6f7b1d234c72724db47cbea6c94bff7ec0106
|
||||
Subproject commit 1f83c3c1ba14d2cdbc319ac060a08cc7c0911b5c
|
@ -18,6 +18,10 @@ export class NodeEnvSecureStorageService implements StorageService {
|
||||
return obj as any;
|
||||
}
|
||||
|
||||
async has(key: string): Promise<boolean> {
|
||||
return await this.get(key) != null;
|
||||
}
|
||||
|
||||
async save(key: string, obj: any): Promise<any> {
|
||||
if (typeof (obj) !== 'string') {
|
||||
throw new Error('Only string storage is allowed.');
|
||||
|
Loading…
Reference in New Issue
Block a user