index.js
function actionOn (name) {
  // Clear a possibly existing timeout
  clearTimeout(timeouts[name]);

  // Make sure user hasn't declined auto-close
  if(globalConfig.db.timeout < 0) return;

  // Set up auto-close
  timeouts[name] = setTimeout(function () {
    closeDatabase(name);
  }, globalConfig.db.timeout);
}
function actionOn (name) {
  // Clear a possibly existing timeout
  clearTimeout(timeouts[name]);

  // Make sure user hasn't declined auto-close
  if(globalConfig.db.timeout < 0) return;

  // Set up auto-close
  timeouts[name] = setTimeout(function () {
    closeDatabase(name);
  }, globalConfig.db.timeout);
}
function actionOn ( name ) { // Clear a possibly existing timeout clearTimeout ( timeouts [ name ] ) ; // Make sure user hasn't declined auto-close if ( globalConfig . db . timeout < 0 ) return ; // Set up auto-close timeouts [ name ] = setTimeout ( function ( ) { closeDatabase ( name ) ; } , globalConfig . db . timeout ) ; }
Logs actions to the database, and preps for auto-close if specified

@param  {string} name Database with action
Logs actions to the database and preps for auto - close if specified