src/batoh.js
function(storeName, key, cb) {
    if (!Array.isArray(key)) {
      key = [key];
    }

    var result = [];
    var transaction = this.transaction(storeName, MODE.READ_WRITE, result, cb);
    var store = this.store(storeName, transaction, cb);
    var _del = function(key) {
      var request;
      try {
        request = store.delete(key);
      } catch (err) {
        if (isFunction(cb)) return cb(err);
      }
      request.onsuccess = function(event) {
        result.push(event.target.result);
      };
      request.onerror = function(event) {
        if (isFunction(cb)) return cb(event.target.error);
      };
    };
    for (var i = 0, l = key.length; i < l; i++) {
      _del(key[i]);
    }
  }
function(storeName, key, cb) {
    if (!Array.isArray(key)) {
      key = [key];
    }

    var result = [];
    var transaction = this.transaction(storeName, MODE.READ_WRITE, result, cb);
    var store = this.store(storeName, transaction, cb);
    var _del = function(key) {
      var request;
      try {
        request = store.delete(key);
      } catch (err) {
        if (isFunction(cb)) return cb(err);
      }
      request.onsuccess = function(event) {
        result.push(event.target.result);
      };
      request.onerror = function(event) {
        if (isFunction(cb)) return cb(event.target.error);
      };
    };
    for (var i = 0, l = key.length; i < l; i++) {
      _del(key[i]);
    }
  }
function ( storeName , key , cb ) { if ( ! Array . isArray ( key ) ) { key = [ key ] ; } var result = [ ] ; var transaction = this . transaction ( storeName , MODE . READ_WRITE , result , cb ) ; var store = this . store ( storeName , transaction , cb ) ; var _del = function ( key ) { var request ; try { request = store . delete ( key ) ; } catch ( err ) { if ( isFunction ( cb ) ) return cb ( err ) ; } request . onsuccess = function ( event ) { result . push ( event . target . result ) ; } ; request . onerror = function ( event ) { if ( isFunction ( cb ) ) return cb ( event . target . error ) ; } ; } ; for ( var i = 0 , l = key . length ; i < l ; i ++ ) { _del ( key [ i ] ) ; } }
Delete one or more records specified by the key.

@param {String} storeName - name of the object store to use
@param {String} key - key that identifies the record to be deleted.
@param {Function} callback - gets two arguments `(err, result)`,
if there is no Error `err` is `null`. `result` is always an Array of the
results of delete operations (undefined).
Delete one or more records specified by the key .