( key: IDBValidKey, customStore = defaultGetStore(), )
| 56 | * @param customStore Method to get a custom store. Use with caution (see the docs). |
| 57 | */ |
| 58 | export function get<T = any>( |
| 59 | key: IDBValidKey, |
| 60 | customStore = defaultGetStore(), |
| 61 | ): Promise<T | undefined> { |
| 62 | return customStore('readonly', (store) => promisifyRequest(store.get(key))); |
| 63 | } |
| 64 | |
| 65 | /** |
| 66 | * Set a value with a key. |
no test coverage detected