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

stream-progressbar

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stream-progressbar - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

12

index.js
var PassThrough = require('stream').PassThrough;
var ProgressBar = require('progress');
module.exports = function(tokens, options) {
module.exports = function (tokens, options) {
options = options || {};

@@ -10,10 +10,10 @@

pt.on('pipe', function(stream) {
if(total) {
pt.on('pipe', function (stream) {
if (total) {
var bar = new ProgressBar(tokens, options);
pt.on('data', function(chunk) {
pt.on('data', function (chunk) {
bar.tick(chunk.length);
});
} else {
stream.on('response', function(res) {
stream.on('response', function (res) {
var total = parseInt(res.headers['content-length'], 10);

@@ -23,3 +23,3 @@ options.total = total;

pt.on('data', function(chunk) {
pt.on('data', function (chunk) {
bar.tick(chunk.length);

@@ -26,0 +26,0 @@ });

{
"name": "stream-progressbar",
"version": "1.0.1",
"version": "1.0.2",
"description": "Simple progress bar for node stream",

@@ -9,12 +9,4 @@ "main": "index.js",

},
"repository": {
"type": "git",
"url": "git+https://github.com/esportsguy/stream-progressbar.git"
},
"author": "Wang Zuo",
"license": "MIT",
"bugs": {
"url": "https://github.com/esportsguy/stream-progressbar/issues"
},
"homepage": "https://github.com/esportsguy/stream-progressbar#readme",
"dependencies": {

@@ -31,3 +23,14 @@ "progress": "^1.1.8"

"pipe"
]
],
"directories": {
"test": "test"
},
"repository": {
"type": "git",
"url": "git+https://github.com/wangzuo/stream-progressbar.git"
},
"bugs": {
"url": "https://github.com/wangzuo/stream-progressbar/issues"
},
"homepage": "https://github.com/wangzuo/stream-progressbar#readme"
}

Sorry, the diff of this file is not supported yet

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