Comparing version 1.5.3 to 1.5.4
19
index.js
@@ -82,3 +82,3 @@ var through = require('through'); | ||
) { | ||
tr.queue(lastToken[1]); | ||
if (lastToken[1].length) tr.queue(lastToken[1]); | ||
} | ||
@@ -95,9 +95,10 @@ | ||
if (Buffer.isBuffer(buf)) { | ||
tr.queue(buf) | ||
if (buf.length) tr.queue(buf) | ||
} | ||
else if (typeof buf === 'string') { | ||
tr.queue(Buffer(buf)); | ||
if (buf.length) tr.queue(Buffer(buf)); | ||
} | ||
else { | ||
tr.queue(Buffer(String(buf))); | ||
buf = String(buf); | ||
if (buf.length) tr.queue(Buffer(buf)); | ||
} | ||
@@ -147,3 +148,3 @@ } | ||
if (sub === undefined) { | ||
tr.queue(lex[1]); | ||
if (lex[1].length) tr.queue(lex[1]); | ||
} | ||
@@ -153,3 +154,3 @@ else if (sub === null) { | ||
} | ||
else tr.queue(sub); | ||
else if (sub.length) tr.queue(sub); | ||
} | ||
@@ -235,3 +236,3 @@ | ||
if (s._level === level) { | ||
if (s.outer) s.queue(lex[1]); | ||
if (s.outer && lex[1].length) s.queue(lex[1]); | ||
s.queue(null); | ||
@@ -249,3 +250,3 @@ removed ++; | ||
var s = this._readStreams[i]; | ||
if (s._level !== undefined) s.queue(lex[1]); | ||
if (s._level !== undefined && lex[1].length) s.queue(lex[1]); | ||
} | ||
@@ -275,3 +276,3 @@ } | ||
var rs = this._readStreams[i]; | ||
if (rs.outer) rs.queue(lex[1]); | ||
if (rs.outer && lex[1].length) rs.queue(lex[1]); | ||
} | ||
@@ -278,0 +279,0 @@ } |
{ | ||
"name" : "trumpet", | ||
"version" : "1.5.3", | ||
"version" : "1.5.4", | ||
"description" : "parse and transform streaming html using css selectors", | ||
@@ -5,0 +5,0 @@ "main" : "index.js", |
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
51302
1281