src/common/idb.js
function deleteItem(id) {
  return new Promise((resolve, reject) => {
    return instance.pkgs.then(db => {
      const req = db.transaction(db.name, 'readwrite')
        .objectStore(db.name).delete(id);
      req.onerror = event => reject(event);
      req.onsuccess = () => resolve();
    });
  });
}
function deleteItem(id) {
  return new Promise((resolve, reject) => {
    return instance.pkgs.then(db => {
      const req = db.transaction(db.name, 'readwrite')
        .objectStore(db.name).delete(id);
      req.onerror = event => reject(event);
      req.onsuccess = () => resolve();
    });
  });
}
function deleteItem ( id ) { return new Promise ( ( resolve , reject ) => { return instance . pkgs . then ( db => { const req = db . transaction ( db . name , 'readwrite' ) . objectStore ( db . name ) . delete ( id ) ; req . onerror = event => reject ( event ) ; req . onsuccess = ( ) => resolve ( ) ; } ) ; } ) ; }
Delete a package
@param {string} id - Package instance ID
Delete a package