How to use the easy-table.aggr function in easy-table

To help you get started, we’ve selected a few easy-table examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github QubitProducts / rjs-report / lib / printer.js View on Github external
return console.log(bundles.join('\n'));
  }

  var t = new Table();

  R.each(function (bundle) {
    t.cell('Bundle', bundle.name);
    t.cell('Size', bundle.size, formatSize);
    t.cell('Gzipped', bundle.gzipped, formatSize);
    t.newRow();
  }, bundles);

  t.sort(['Size|des']);

  t.total('Size', Table.aggr.sum, formatSize);
  t.total('Gzipped', Table.aggr.sum, formatSize);

  console.log(t.toString());
}
github QubitProducts / rjs-report / lib / printer.js View on Github external
if (options.plain) {
    return console.log(bundles.join('\n'));
  }

  var t = new Table();

  R.each(function (bundle) {
    t.cell('Bundle', bundle.name);
    t.cell('Size', bundle.size, formatSize);
    t.cell('Gzipped', bundle.gzipped, formatSize);
    t.newRow();
  }, bundles);

  t.sort(['Size|des']);

  t.total('Size', Table.aggr.sum, formatSize);
  t.total('Gzipped', Table.aggr.sum, formatSize);

  console.log(t.toString());
}