node_modules/localforage/test copy/localforage.component.js
// previously exist), using any options set in the config.
previously exist), using any options set in the config.
previously exist ) using any options set in the config .
function _initStorage(options) {
        var _this = this;
        if (options) {
            for (var i in dbInfo) {
                dbInfo[i] = typeof(options[i]) !== 'string' ? options[i].toString() : options[i];
            }
        }
        return new Promise(function(resolve) {
            try {
                db = openDatabase(dbInfo.name, dbInfo.version,
                                  dbInfo.description, dbInfo.size);
            } catch (e) {
                return _this.setDriver('localStorageWrapper').then(resolve);
            }
            db.transaction(function (t) {
                t.executeSql('CREATE TABLE IF NOT EXISTS ' + dbInfo.storeName + 
                             ' (id INTEGER PRIMARY KEY, key unique, value)', [], function() {
                    resolve();
                }, null);
            });
        });
    }
function _initStorage ( options ) { var _this = this ; if ( options ) { for ( var i in dbInfo ) { dbInfo [ i ] = typeof ( options [ i ] ) !== 'string' ? options [ i ] . toString ( ) : options [ i ] ; } } return new Promise ( function ( resolve ) { try { db = openDatabase ( dbInfo . name , dbInfo . version , dbInfo . description , dbInfo . size ) ; } catch ( e ) { return _this . setDriver ( 'localStorageWrapper' ) . then ( resolve ) ; } db . transaction ( function ( t ) { t . executeSql ( 'CREATE TABLE IF NOT EXISTS ' + dbInfo . storeName + ' (id INTEGER PRIMARY KEY, key unique, value)' , [ ] , function ( ) { resolve ( ) ; } , null ) ; } ) ; } ) ; }
previously exist), using any options set in the config.
previously exist ) using any options set in the config .
// Open the database; the openDatabase API will automatically // create it for us if it doesn't exist. // Create our key/value table if it doesn't exist.