constructor (storage) { this.cache = {} try { this.storage = localForage.createInstance({ name: 'countdown_1' }) } catch (e) { console.log(e) console.warn('Failed to create localForage instance. Settings will not be saved after page closes.') } }
store_init ( ) : Promise<any> { return new Promise ( ( resolve, reject ) => { if ( this._store ) { resolve ( true ); } else { this._store = localForage.createInstance ( { name : 'mortis_mobile_client', storeName : this._config.store_name } ); resolve ( true ); } } ); }
constructor () { this.cache = {} this.initialized = false try { this.storage = localForage.createInstance({ name: 'countdown_1' }) } catch (e) { console.log(e) console.warn('Failed to create localForage instance. Settings will not be saved after page closes.') } }