docs: function skladConnection_insert() {
          const isMulti = (arguments.length === 1);
          const objStoreNames = isMulti ? Object.keys(arguments[0]) : [arguments[0]];
  
          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);
          }
  
          let data;
          if (isMulti) {
              data = arguments[0];
          } else {
              data = {};
              data[arguments[0]] = [arguments[1]];
          }
  
          return getObjStoresMeta(this.database, objStoreNames).then(() => {
              return new Promise((resolve, reject) => {
                  const result = {};
                  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.forEach(objStoreName => {
                              const promise = this.insert({
                                  [objStoreName]: Array.isArray(data[objStoreName]) ? data[objStoreName] : [data[objStoreName]]
                              }).then(res => res[objStoreName]);
  
                              promises[objStoreName] = promise;
                          });
  
                          resolveAllPromises(promises).then(resolve, reject);
                      } else {
                          reject(ex);
                      }
  
                      return;
                  }
  
                  transaction.oncomplete = transaction.onerror = transaction.onabort = function skladConnection_insert_onFinish(evt) {
                      const err = abortErr || evt.target.error;
                      const isSuccess = !err && evt.type === 'complete';
  
                      if (isSuccess) {
                          resolve(isMulti ? result : result[objStoreNames[0]][0]);
                      } else {
                          reject(ensureError(err));
                      }
  
                      if (evt.type === 'error') {
                          evt.preventDefault();
                      }
                  };
  
                  for (let objStoreName in data) {
                      const objStore = transaction.objectStore(objStoreName);
  
                      for (let i = 0; i < data[objStoreName].length; i++) {
                          const checkedData = checkSavedData(this.database.name, objStore, data[objStoreName][i]);
  
                          if (!checkedData) {
                              abortErr = createError('InvalidStateError', 'You must supply objects to be saved in the object store with set keyPath');
                              return;
                          }
  
                          let req;
                          try {
                              req = objStore.add.apply(objStore, checkedData);
                          } catch (ex) {
                              abortErr = ex;
                              continue;
                          }
  
                          req.onsuccess = function (evt) {
                              result[objStoreName] = result[objStoreName] || [];
                              result[objStoreName][i] = evt.target.result;
                          };
                      }
                  }
              });
          });
      }