Comparing version 0.1.1 to 0.2.0
@@ -154,2 +154,16 @@ var Stream = require('stream').Stream; | ||
}, | ||
replace : function (cb) { | ||
if (expired) expire(); | ||
p.buffered = ''; | ||
p.callback = function (html) { | ||
this.emit('data', | ||
typeof cb === 'function' ? cb(html) : cb | ||
); | ||
sel.updating = false; | ||
}; | ||
sel.updating = true; | ||
sel.removing = true; | ||
sel.pending.push(p); | ||
}, | ||
remove : function () { | ||
@@ -156,0 +170,0 @@ if (expired) expire(); |
{ | ||
"name" : "trumpet", | ||
"version" : "0.1.1", | ||
"version" : "0.2.0", | ||
"description" : "parse and transform streaming html using css selectors", | ||
@@ -5,0 +5,0 @@ "main" : "index.js", |
@@ -31,2 +31,6 @@ var test = require('tap').test; | ||
tr.select('.f', function (node) { | ||
node.replace('<b>NOTHING TO SEE HERE</b>'); | ||
}); | ||
var data = ''; | ||
@@ -33,0 +37,0 @@ tr.on('data', function (buf) { data += buf }); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
15932
293
223