Skip to content

Commit bffd643

Browse files
committed
fix: remove check function
1 parent e462f28 commit bffd643

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/utils/storage.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const DEFAULT_SATURN_STORAGE_NAME = 'saturn-client'
88

99
/**
1010
* @typedef {object} Storage
11-
* @property {function():boolean} check - Checks if the provided Storage is accessible
1211
* @property {function(string):Promise<any>} get - Retrieves the value associated with the key.
1312
* @property {function(string,any):Promise<void>} set - Sets a new value for the key.
1413
* @property {function(string):Promise<any>} delete - Deletes the value associated with the key.
@@ -30,7 +29,6 @@ export function indexedDbStorage () {
3029
}
3130

3231
return {
33-
check: () => Boolean(indexedDbExists),
3432
get: async (key) => indexedDbExists && (await dbPromise).get(DEFAULT_SATURN_STORAGE_NAME, key),
3533
set: async (key, value) => indexedDbExists && (await dbPromise).put(DEFAULT_SATURN_STORAGE_NAME, value, key),
3634
delete: async (key) => indexedDbExists && (await dbPromise).delete(DEFAULT_SATURN_STORAGE_NAME, key)
@@ -45,7 +43,6 @@ export function memoryStorage () {
4543
const storageObject = {}
4644

4745
return {
48-
check: () => true, // Memory storage is always accessible
4946
get: (key) => Promise.resolve(storageObject[key]),
5047
set: (key, value) => {
5148
storageObject[key] = value

0 commit comments

Comments
 (0)