src/store/indexeddb-local-backend.js
function(accountData) {
        return Promise.try(() => {
            const txn = this.db.transaction(["accountData"], "readwrite");
            const store = txn.objectStore("accountData");
            for (let i = 0; i < accountData.length; i++) {
                store.put(accountData[i]); // put == UPSERT
            }
            return txnAsPromise(txn);
        });
    }
function(accountData) {
        return Promise.try(() => {
            const txn = this.db.transaction(["accountData"], "readwrite");
            const store = txn.objectStore("accountData");
            for (let i = 0; i < accountData.length; i++) {
                store.put(accountData[i]); // put == UPSERT
            }
            return txnAsPromise(txn);
        });
    }
function ( accountData ) { return Promise . try ( ( ) => { const txn = this . db . transaction ( [ "accountData" ] , "readwrite" ) ; const store = txn . objectStore ( "accountData" ) ; for ( let i = 0 ; i < accountData . length ; i ++ ) { store . put ( accountData [ i ] ) ; // put == UPSERT } return txnAsPromise ( txn ) ; } ) ; }
Persist a list of account data events. Events with the same 'type' will
be replaced.
@param {Object[]} accountData An array of raw user-scoped account data events
@return {Promise} Resolves if the events were persisted.
Persist a list of account data events . Events with the same type will be replaced .