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

cli

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cli - npm Package Compare versions

Comparing version 0.6.5 to 0.6.6

progress.js

24

cli.js

@@ -67,3 +67,3 @@ /**

cli.output = cli.native.util.print;
cli.output = console.log;
cli.exit = require('exit');

@@ -1097,3 +1097,4 @@

var last_progress_call, progress_len = 74;
cli.progress = function (progress, decimals) {
cli.progress = function (progress, decimals, stream) {
stream = stream || process.stdout;
if (progress < 0 || progress > 1 || isNaN(progress)) return;

@@ -1121,3 +1122,9 @@ if (!decimals) decimals = 0;

}
cli.native.util.print('[' + str + '] ' + percentage + (progress === 1 ? '\n' : '\u000D'));
stream.clearLine();
stream.write('[' + str + '] ' + percentage);
if (progress === 1) {
stream.write('\n');
} else {
stream.cursorTo(0);
}
};

@@ -1132,5 +1139,8 @@

var spinnerInterval;
cli.spinner = function (prefix, end) {
cli.spinner = function (prefix, end, stream) {
stream = stream || process.stdout;
if (end) {
cli.native.util.print('\u000D' + prefix);
stream.clearLine();
stream.cursorTo(0);
stream.write(prefix + '\n');
return clearInterval(spinnerInterval);

@@ -1141,5 +1151,7 @@ }

spinnerInterval = setInterval(function () {
cli.native.util.print('\u000D' + prefix + spinner[i++]);
stream.clearLine();
stream.cursorTo(0);
stream.write(prefix + spinner[i++]);
if (i == l) i = 0;
}, 200);
};
{ "name" : "cli",
"description" : "A tool for rapidly building command line apps",
"version" : "0.6.5",
"version" : "0.6.6",
"homepage" : "http://github.com/chriso/cli",

@@ -5,0 +5,0 @@ "keywords" : ["cli","command line","opts","parseopt","opt","args","console","argsparse","optparse","daemon","autocomplete","command","autocompletion"],

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