pullstream
Advanced tools
Comparing version 0.2.1 to 0.2.2
{ | ||
"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; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24124
4
457
+ Addedslice-stream@0.0.0
+ Addedslice-stream@0.0.0(transitive)
Updateduntil-stream@~0.2.2