New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

antr

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

antr - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

8

lib/Reporter.js

@@ -110,5 +110,11 @@ var sty = require('sty');

return this._progress + '/' + this._totalNum + ' ' + percent + '%';
return this._progress + '/' + this._totalNum + ' ' + percent + '%' + this.getProgressBar(percent);
}
Reporter.prototype.getProgressBar = function (percent) {
if(!this._runner._options.progressBar) return '';
var chunks = Math.floor(percent / 5);
return ' [' + str.repeat('=', chunks - 1) + '>' + str.repeat('-', 20 - chunks) + ']';
}
module.exports = Reporter;

3

lib/Runner.js

@@ -20,3 +20,4 @@ var async = require('async');

timeout: (isNaN(parseInt(options.timeout)) )? 30000 : parseInt(options.timeout) * 1000,
listFiles: options.listFiles || false
listFiles: options.listFiles || false,
progressBar: (options.progressBar == false) ? false : true
}

@@ -23,0 +24,0 @@ this._stats = {

@@ -9,3 +9,3 @@ {

],
"version": "0.0.2",
"version": "0.0.3",
"dependencies": {

@@ -12,0 +12,0 @@ "async": "0.2.7",

@@ -16,3 +16,3 @@ var Runner = require('../../lib/Runner.js');

var progress = reporter.getProgress();
assert.equal('5/10 50.0%', progress)
assert.equal('5/10 50.0% [=========>----------]', progress)
})();
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