New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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 1.0.9 to 1.1.0

1

changelog.txt

@@ -22,2 +22,3 @@ 0.0.1 - [2013/08/15] - Initial Release

1.0.9 - Added rotate ability to print() text routine, exposed opacity in print routine
1.1.0 - Added Ability to use .recordCount & cancel report and fixed issue where Header wasn't printing on no data.

@@ -24,0 +25,0 @@

@@ -93,2 +93,21 @@ # fluentReports Commands

#### .recordCount(recordCountCallback(count, continueCallback))
##### Description
This allows you to be notified of the query result count before the printing actually happens. This is useful where you can't know the report data count before the report starts, because you are passing in a object that does all the queries itself. The report when it queries the data count, will call your *RecordCountCallback* function, this function will receive a record count, and a callback function. You MUST call the continueCallback function. You can optionally pass the continueCallback a boolean "false" to actually cancel the report, any other value (and no value) is considered that you want to continue printing.
In the event you choose to cancel the report no report will be is generated; and the final render callback done will be passed "false" instead of a filename or buffer.
##### Parameters
* recordCountCallback function
##### Example:
function rcCount(count, continueCallback) {
if (count === 0) { console.log("No records"); callback(false); }
else if (count > 250) { console.log("Too many records") callback(false); }
else callback( /* you can pass in true if you want */);
}
MyReportObject.recordCount(rcCount);
<br><br><br>
#### .keys ( keys )

@@ -236,4 +255,5 @@ ##### Description

* if rendering to pipe (err, pipe)
* If rendering is CANCELLED (i.e. like via the .recordCount callback) it will return (err, false);
##### Example
MyReportObject.render(function(Err, name) { console.log("The report was saved to", name); });
MyReportObject.render(function(Err, name) { if (name === false) { console.log("Report was cancelled"); } else { console.log("The report was saved to", name); });

@@ -240,0 +260,0 @@ <br><br><br>

2

package.json

@@ -32,3 +32,3 @@ {

"main": "lib/fluentReports",
"version": "1.0.9",
"version": "1.1.0",
"engines": {

@@ -35,0 +35,0 @@ "node": ">= 0.6.0"

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

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