hyperstream
Advanced tools
Comparing version 0.4.0 to 0.5.0
@@ -21,3 +21,3 @@ var trumpet = require('trumpet'); | ||
} | ||
else if (typeof value === 'object' && value.pipe) { | ||
else if (isStream(value)) { | ||
vstream.pipe(elem.createWriteStream()); | ||
@@ -28,3 +28,6 @@ vstream.resume(); | ||
Object.keys(value).forEach(function (sel) { | ||
elem.setAttribute(sel, value[sel]); | ||
if (sel === '_html') { | ||
value[sel].pipe(elem.createWriteStream()) | ||
} | ||
else elem.setAttribute(sel, value[sel]); | ||
}); | ||
@@ -42,1 +45,3 @@ } | ||
}; | ||
function isStream (s) { return s && typeof s.pipe === 'function' } |
{ | ||
"name" : "hyperstream", | ||
"version" : "0.4.0", | ||
"version" : "0.5.0", | ||
"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
15182
306
76