public/db.js
//function to save record into db
function to save record into db
function to save record into db
function saveRecord(record) {
    const transaction = db.transaction(["pending"], "readwrite");
    const store = transaction.objectStore("pending");
    store.add(record);    
}
function saveRecord ( record ) { const transaction = db . transaction ( [ "pending" ] , "readwrite" ) ; const store = transaction . objectStore ( "pending" ) ; store . add ( record ) ; }
function to save record into db
function to save record into db
//creates a transaction on the pending db with readwrite access