Export get (for use later)
This commit is contained in:
parent
75beb0e282
commit
38b404d453
1 changed files with 11 additions and 1 deletions
|
|
@ -8,6 +8,16 @@ function set(key, value) {
|
||||||
})
|
})
|
||||||
localforage.setItem(key, value);
|
localforage.setItem(key, value);
|
||||||
}
|
}
|
||||||
|
async function get(key) {
|
||||||
|
localforage.config({
|
||||||
|
driver: localforage.INDEXEDDB,
|
||||||
|
name: 'Nebula',
|
||||||
|
version: 1.0,
|
||||||
|
storeName: 'nebula_config',
|
||||||
|
description: 'Nebula Config for things reliant on IndexedDB'
|
||||||
|
})
|
||||||
|
return await localforage.getItem(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
export { set };
|
export { set, get }
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue