Socket
Socket
Sign inDemoInstall

pullstream

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pullstream - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

7

package.json
{
"name": "pullstream",
"version": "0.2.1",
"version": "0.2.2",
"description": "A stream you can pull data from.",

@@ -28,5 +28,6 @@ "main": "pullstream.js",

"over": "~0.0.5",
"until-stream": "~0.2.1",
"setimmediate": "~1.0.1"
"until-stream": "~0.2.2",
"setimmediate": "~1.0.1",
"slice-stream": "0.0.0"
}
}

@@ -9,2 +9,3 @@ 'use strict';

var over = require('over');
var SliceStream = require('slice-stream');

@@ -24,5 +25,2 @@ function PullStream(opts) {

});
this.on('drain', function() {
self._process();
});
}

@@ -76,15 +74,15 @@ inherits(PullStream, UntilStream);

var self = this;
pipeServiceRequest();
function pipeServiceRequest() {
self._serviceRequests = null;
var data = self.read(len);
if (data) {
destStream.write(data);
destStream.end();
} else {
self._serviceRequests = pipeServiceRequest;
}
}
var pullstream = this;
pullstream
.pipe(new SliceStream({ length: len }, function (buf, sliceEnd, extra) {
if (!sliceEnd) {
return this.push(buf);
}
pullstream.unpipe();
pullstream.unshift(extra);
this.push(buf);
return this.push(null);
}))
.pipe(destStream);

@@ -91,0 +89,0 @@ return destStream;

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