Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fluentreports

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fluentreports - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

aparaj.ttf

12

examples/demo1.js

@@ -66,3 +66,4 @@ var Report = require('../lib/fluentReports' ).Report;

var weekdetail = function ( report, data ) {
report.print( ["Week Number: " + data.week], {x: 100} );
// We could do this --> report.setCurrentY(report.getCurrentY()+2); Or use the shortcut below of addY: 2
report.print( ["Week Number: " + data.week], {x: 100, addY: 2} );
};

@@ -76,2 +77,4 @@

// You don't have to pass in a report name; it will default to "report.pdf"

@@ -81,3 +84,3 @@ var reportName = "demo1.pdf";

var rpt = new Report(reportName)
.autoPrint(false) // Optional
.autoPrint(false) // Optional
.pageHeader( ["Employee Hours"] )// Optional

@@ -93,3 +96,3 @@ .finalSummary( ["Total Hours:", "hours", 3] )// Optional

rpt.groupBy( "name" )
.sum( "hours" )
.sum('hours')
.header( nameheader )

@@ -100,2 +103,5 @@ .footer( namefooter )

// Debug output is always nice (Optional, to help you see the structure)

@@ -102,0 +108,0 @@ rpt.printStructure();

@@ -110,3 +110,4 @@ var Report = require('../lib/fluentReports' ).Report;

ninety_original: 0,
hundredtwenty_original: 0 } ];
hundredtwenty_original: 0 }
];

@@ -137,3 +138,3 @@

for (var i=0;i<msg.length;i++) {
if(msg[i]) { rpt.print(msg[i]); }
if(msg[i]) { rpt.print(msg[i], {textColor: 'blue'}); }
else { rpt.newLine(); }

@@ -183,3 +184,3 @@ }

{data: 'Total Due', width: 60, align: 3}
], {border: 0, width: 0});
]);
rpt.fontNormal();

@@ -222,3 +223,3 @@ rpt.bandLine();

for (var key in data) {
if (key == 'sale.no') continue;
if (key === 'sale.no') { continue; }
if (data.hasOwnProperty(key)) {

@@ -228,4 +229,7 @@ // Simple Stupid Money formatter. It is really dumb. ;-)

var idx = data[key].indexOf('.');
if (idx < 0) data[key] += '.00';
else if (idx < data[key].length - 1) data[key] += '0';
if (idx < 0) {
data[key] += '.00';
} else if (idx < data[key].length - 1) {
data[key] += '0';
}
}

@@ -237,2 +241,5 @@ }

// Optional -- If you don't pass a report name, it will default to "report.pdf"

@@ -272,3 +279,3 @@ var rptName = "demo2.pdf";

console.time("Rendered");
var a= resultReport.render(function(err, name) {
resultReport.render(function(err, name) {
console.timeEnd("Rendered");

@@ -275,0 +282,0 @@ if (err) {

@@ -14,4 +14,4 @@ {

"main" : "lib/fluentReports",
"version" : "0.0.2",
"version" : "0.0.3",
"engines" : {"node": ">= 0.6.0" }
}

@@ -0,0 +0,0 @@ Fluent Reports

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc