(key: string)
| 65 | } |
| 66 | |
| 67 | export async function getKey(key: string): Promise<string | number | undefined> { |
| 68 | return db |
| 69 | .table('storage') |
| 70 | .get(key) |
| 71 | .then(res => { |
| 72 | if (typeof res === 'undefined') return res; |
| 73 | return res.value; |
| 74 | }); |
| 75 | } |
| 76 | |
| 77 | export async function setKey(key: string, value: string | number) { |
| 78 | return db.table('storage').put({ |