Removed log statement that snuck in
This commit is contained in:
parent
1877bac7ce
commit
e3bbd13ed8
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ztimson/utils",
|
"name": "@ztimson/utils",
|
||||||
"version": "0.25.9",
|
"version": "0.25.10",
|
||||||
"description": "Utility library",
|
"description": "Utility library",
|
||||||
"author": "Zak Timson",
|
"author": "Zak Timson",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -34,10 +34,7 @@ export class Cache<K extends string | number | symbol, T> {
|
|||||||
if(options.storageKey && !options.storage && typeof(Storage) !== 'undefined') options.storage = localStorage;
|
if(options.storageKey && !options.storage && typeof(Storage) !== 'undefined') options.storage = localStorage;
|
||||||
if(options.storage) {
|
if(options.storage) {
|
||||||
if(options.storage instanceof Table) {
|
if(options.storage instanceof Table) {
|
||||||
(async () => (await options.storage?.getAll()).forEach((v: any) => {
|
(async () => (await options.storage?.getAll()).forEach((v: any) => this.add(v)))()
|
||||||
console.log(v);
|
|
||||||
this.add(v)
|
|
||||||
}))()
|
|
||||||
} else if(options.storageKey) {
|
} else if(options.storageKey) {
|
||||||
const stored = options.storage?.getItem(options.storageKey);
|
const stored = options.storage?.getItem(options.storageKey);
|
||||||
if(stored != null) try { Object.assign(this.store, JSON.parse(stored)); } catch { }
|
if(stored != null) try { Object.assign(this.store, JSON.parse(stored)); } catch { }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user