report-generator
v1.0.5
Published
generates html reports
Downloads
20
Readme
report-generator
report-generator encapsulates the task of creating simple html reports.
##quick example
var reportGenerator = require('report-generator');
var generator new reportGenerator('report.html', ['col1', 'col2'], function (err) {
assert(err === null);
});
// write a simple row
generator.writeRow(['cell1', 'cell2'], function (err) {
assert(err === null);
});
// write a row using a cell object, with color support
var cells = [
{cellContent: '1', color: "red"},
{cellContent: '2', color: "red"}
];
var row = [cells];
generator.writeRows(row, function (err) {
assert(err === null);
done();
});
generator.closeReport(function(err){
assert(err === null);
});