hyperstream
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -31,3 +31,4 @@ var trumpet = require('trumpet'); | ||
acc[key] = stream.pause(); | ||
stream.queue(String(sm)); | ||
var s = String(sm); | ||
if (s.length) stream.queue(s); | ||
stream.queue(null); | ||
@@ -55,3 +56,5 @@ } | ||
streams[key].pipe(through( | ||
function (buf) { output.queue(buf) }, | ||
function (buf) { | ||
if (buf.length) output.queue(buf) | ||
}, | ||
function () { | ||
@@ -58,0 +61,0 @@ active = false; |
@@ -14,3 +14,3 @@ var through = require('through'); | ||
for (var i = 0; i < buffer.length; i++) { | ||
tr.queue(buffer[i]); | ||
if (buffer[i].length) tr.queue(buffer[i]); | ||
} | ||
@@ -29,7 +29,8 @@ buffer.splice(0); | ||
bytes += buf.length; | ||
tr.queue(buffer[i]); | ||
if (buffer[i].length) tr.queue(buffer[i]); | ||
} | ||
else { | ||
bytes = to; | ||
tr.queue(buf.slice(0, buf.length - to + bytes)); | ||
var b = buf.slice(0, buf.length - to + bytes); | ||
if (b.length) tr.queue(b); | ||
buffer.splice(0, i + 1, buf.slice(buf.length - to + bytes)); | ||
@@ -49,3 +50,4 @@ return; | ||
bytes = to; | ||
tr.queue(buf.slice(0, buf.length - to + bytes)); | ||
var b = buf.slice(0, buf.length - to + bytes); | ||
if (b.length) tr.queue(b); | ||
buffer.push(buf.slice(buf.length - to + bytes)); | ||
@@ -55,3 +57,3 @@ } | ||
bytes += buf.length; | ||
tr.queue(buf); | ||
if (buf.length) tr.queue(buf); | ||
} | ||
@@ -58,0 +60,0 @@ } |
{ | ||
"name" : "hyperstream", | ||
"version" : "0.1.3", | ||
"version" : "0.1.4", | ||
"description" : "stream html into html at a css selector", | ||
@@ -5,0 +5,0 @@ "main" : "index.js", |
Sorry, the diff of this file is not supported yet
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
16772
37
372
1