You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
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

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)
})();