code: function skladConnection_clear(objStoreNames) {
          objStoreNames = Array.isArray(objStoreNames) ? objStoreNames : [objStoreNames];
  
          const allObjStoresExist = checkContainingStores.call(this, objStoreNames);
          if (!allObjStoresExist) {
              const err = createError('NotFoundError', `Database ${this.database.name} (version ${this.database.version}) doesn't contain all needed stores`);
              return Promise.reject(err);
          }
  
          return new Promise((resolve, reject) => {
              let transaction;
              let abortErr;
  
              // Safari9 can't run multi-objectstore transactions
              // divide one transaction into many with one object store to fix this
              try {
                  transaction = this.database.transaction(objStoreNames, TRANSACTION_READWRITE);
              } catch (ex) {
                  if (ex.name === 'NotFoundError') {
                      const promises = objStoreNames.map(objStoreName => this.clear([objStoreName]));
                      Promise.all(promises).then(() => resolve()).catch(reject);
                  } else {
                      reject(ex);
                  }
  
                  return;
              }
  
              transaction.oncomplete = transaction.onerror = transaction.onabort = function skladConnection_clear_onFinish(evt) {
                  const err = abortErr || evt.target.error;
  
                  if (err) {
                      reject(ensureError(err));
                  } else {
                      resolve();
                  }
  
                  if (evt.type === 'error') {
                      evt.preventDefault();
                  }
              };
  
              objStoreNames.forEach(objStoreName => {
                  const objStore = transaction.objectStore(objStoreName);
  
                  if (abortErr) {
                      return;
                  }
  
                  try {
                      objStore.clear();
                  } catch (ex) {
                      abortErr = ex;
                  }
              });
          });
      }
docs: Clear object store(s)
  
  @param {Array|String} objStoreNames array of object stores or a single object store
  @return {Promise}
  @param {Error} err