docs: function closeDatabase (name) {
    var deferred = q.defer();
  
    // We need to be sure the database location exists
    ready.then(function () {
      clearTimeout(timeouts[name]);
  
      // Write to file
      write(name).then(function () {
        // Remove database from memory
        delete databases[name];
  
        deferred.resolve();
      }, function (err) {
        deferred.reject(err);
      });
    }, function () {
      deferred.reject('Database couldn\'t instantiate');
    });
  
    return deferred.promise;
  }