src/batoh.js
function(storeName, cb) {
    var result;
    var transaction = this.transaction(storeName, MODE.READ_WRITE, result, cb);
    var store = this.store(storeName, transaction, cb);
    var request;
    try {
      request = store.clear();
    } catch (err) {
      if (isFunction(cb)) return cb(err);
    }
    request.onsuccess = function(event) {
      result = event.target.result;
    };
    request.onerror = function(event) {
      if (isFunction(cb)) return cb(event.target.error);
    };
  }
function(storeName, cb) {
    var result;
    var transaction = this.transaction(storeName, MODE.READ_WRITE, result, cb);
    var store = this.store(storeName, transaction, cb);
    var request;
    try {
      request = store.clear();
    } catch (err) {
      if (isFunction(cb)) return cb(err);
    }
    request.onsuccess = function(event) {
      result = event.target.result;
    };
    request.onerror = function(event) {
      if (isFunction(cb)) return cb(event.target.error);
    };
  }
function ( storeName , cb ) { var result ; var transaction = this . transaction ( storeName , MODE . READ_WRITE , result , cb ) ; var store = this . store ( storeName , transaction , cb ) ; var request ; try { request = store . clear ( ) ; } catch ( err ) { if ( isFunction ( cb ) ) return cb ( err ) ; } request . onsuccess = function ( event ) { result = event . target . result ; } ; request . onerror = function ( event ) { if ( isFunction ( cb ) ) return cb ( event . target . error ) ; } ; }
Clear the object store of all records.

@param {String} storeName - name of the object store to clear
@param {Function} callback - gets one argument `(err)`,
if there is no error `err` is null.
Clear the object store of all records .