Comparing version 1.0.0 to 1.1.0
19
index.js
@@ -66,2 +66,4 @@ var through = require('through'); | ||
r.on('queue', function (buf) { tr.queue(buf) }); | ||
selectors.push(r); | ||
@@ -74,2 +76,3 @@ return r; | ||
if (cb) r.on('element', cb); | ||
r.on('queue', function (buf) { tr.queue(buf) }); | ||
@@ -144,3 +147,13 @@ r._matcher.on('open', function (node) { | ||
var remainingSets = []; | ||
self._matcher.on('open', function () { | ||
remainingSets = Object.keys(self._setAttr); | ||
}); | ||
self._matcher.on('tag-end', function (m) { | ||
for (var i = 0; i < remainingSets.length; i++) { | ||
var key = remainingSets[i]; | ||
self.emit('queue', Buffer(' ' + self._setAttr[key])); | ||
} | ||
if (self._readStreams.length) { | ||
@@ -168,3 +181,7 @@ self._reading = true; | ||
var v = self._setAttr[node.name]; | ||
if (v !== undefined) self._substitute = v; | ||
if (v !== undefined) { | ||
self._substitute = v; | ||
var ix = remainingSets.indexOf(node.name); | ||
if (ix >= 0) remainingSets.splice(ix, 1); | ||
} | ||
}); | ||
@@ -171,0 +188,0 @@ } |
{ | ||
"name" : "trumpet", | ||
"version" : "1.0.0", | ||
"version" : "1.1.0", | ||
"description" : "parse and transform streaming html using css selectors", | ||
@@ -5,0 +5,0 @@ "main" : "index.js", |
@@ -24,4 +24,2 @@ var trumpet = require('../'); | ||
t.plan(1); | ||
t.ok(true, 'skip'); | ||
return; | ||
@@ -28,0 +26,0 @@ var tr = trumpet(); |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
39373
995
156
0