lib/instance-detail-helper.js
function getStats(results, done) {
  const databases = results.databases;

  const keys = ['document_count', 'storage_size', 'index_count', 'index_size'];
  const stats = {};
  keys.map(function(k) {
    stats[k] = 0;
  });
  databases.map(function(db) {
    keys.map(function(k) {
      stats[k] += db[k];
    });
  });
  done(null, stats);
}
function getStats(results, done) {
  const databases = results.databases;

  const keys = ['document_count', 'storage_size', 'index_count', 'index_size'];
  const stats = {};
  keys.map(function(k) {
    stats[k] = 0;
  });
  databases.map(function(db) {
    keys.map(function(k) {
      stats[k] += db[k];
    });
  });
  done(null, stats);
}
function getStats ( results , done ) { const databases = results . databases ; const keys = [ 'document_count' , 'storage_size' , 'index_count' , 'index_size' ] ; const stats = { } ; keys . map ( function ( k ) { stats [ k ] = 0 ; } ) ; databases . map ( function ( db ) { keys . map ( function ( k ) { stats [ k ] += db [ k ] ; } ) ; } ) ; done ( null , stats ) ; }
aggregates stats across all found databases
@param  {Object}   results   async.auto results
@param  {Function} done      callback
aggregates stats across all found databases