localforage.js
// previously exist), using any options set in window.localForageConfig.
previously exist), using any options set in window.localForageConfig.
previously exist ) using any options set in window . localForageConfig .
function _initStorage(options) {
        if (options) {
            for (var i in options) {
                dbInfo[i] = options[i];
            }
        }
        return new Promise(function(resolve, reject) {
            var openreq = indexedDB.open(dbInfo.name, dbInfo.version);
            openreq.onerror = function withStoreOnError() {
                reject(openreq.error.name);
            };
            openreq.onupgradeneeded = function withStoreOnUpgradeNeeded() {
                openreq.result.createObjectStore(dbInfo.storeName);
            };
            openreq.onsuccess = function withStoreOnSuccess() {
                db = openreq.result;
                resolve();
            };
        });
    }
function _initStorage ( options ) { if ( options ) { for ( var i in options ) { dbInfo [ i ] = options [ i ] ; } } return new Promise ( function ( resolve , reject ) { var openreq = indexedDB . open ( dbInfo . name , dbInfo . version ) ; openreq . onerror = function withStoreOnError ( ) { reject ( openreq . error . name ) ; } ; openreq . onupgradeneeded = function withStoreOnUpgradeNeeded ( ) { openreq . result . createObjectStore ( dbInfo . storeName ) ; } ; openreq . onsuccess = function withStoreOnSuccess ( ) { db = openreq . result ; resolve ( ) ; } ; } ) ; }
previously exist), using any options set in window.localForageConfig.
previously exist ) using any options set in window . localForageConfig .
// First time setup: create an empty object store