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

ts-progress

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-progress - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

5

package.json
{
"name": "ts-progress",
"version": "0.0.6",
"version": "0.0.7",
"description": "Flexible node progress bar.",

@@ -41,6 +41,5 @@ "main": "progress.js",

"dependencies": {
"charm": "^1.0.1",
"numeral": "^1.5.3"
"charm": "^1.0.1"
},
"devDependencies": ""
}

17

progress.js
'use strict';
var numeral = require('numeral');
var charm = require('charm')();

@@ -63,12 +62,12 @@ charm.pipe(process.stdout);

this.renderElapsed = function (color) {
_this.renderItem(numeral(_this._elapsed).format('0.0') + 's', color);
_this.renderItem(_this._elapsed.toFixed(1) + "s", color);
};
this.renderRemaining = function (color) {
_this.renderItem(numeral(_this._remaining).format('0.0') + 's', color);
_this.renderItem(_this._remaining.toFixed(1) + "s", color);
};
this.renderMemory = function (color) {
_this.renderItem(numeral(process.memoryUsage().rss / 1024 / 1024).format('0.0') + 'M', color);
_this.renderItem((process.memoryUsage().rss / 1024 / 1024).toFixed(1) + "M", color);
};
this.renderPercent = function (color) {
_this.renderItem(numeral(_this._percent).format('0') + "%", color);
_this.renderItem(_this._percent.toFixed(0) + "%", color);
};

@@ -118,6 +117,8 @@ this.renderCurrent = function (color) {

this.renderText = function (text) {
if (_this._textColor)
if (_this._textColor) {
charm.display('bright').foreground(_this._textColor).write(text).display('reset');
else
}
else {
charm.display('bright').write(text).display('reset');
}
};

@@ -138,3 +139,3 @@ this.renderTitle = function () {

/**
* Creates new progress bar object
* Creates new progress object
* @param options

@@ -141,0 +142,0 @@ * @returns {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