feedparser
Advanced tools
Comparing version 0.3.2 to 0.3.3
@@ -92,3 +92,3 @@ /********************************************************************** | ||
var self = this; | ||
self._reset(); | ||
self._reset(callback); | ||
self.saxStream.end(string, 'utf8'); | ||
@@ -108,6 +108,6 @@ }; | ||
var self = this; | ||
self._reset(); | ||
if (/^https?:/.test(file) || (typeof file == 'object' && 'protocol' in file)) { | ||
self.parseUrl(file, callback); | ||
} else { | ||
self._reset(callback); | ||
fs.createReadStream(file).pipe(self.saxStream); | ||
@@ -132,3 +132,3 @@ } | ||
var self = this; | ||
self._reset(); | ||
self._reset(callback); | ||
request(url).pipe(self.saxStream); | ||
@@ -154,3 +154,3 @@ }; | ||
var self = this; | ||
self._reset(); | ||
self._reset(callback); | ||
stream.pipe(self.saxStream); | ||
@@ -168,4 +168,4 @@ }; | ||
} | ||
if ('function' == typeof callback) { | ||
callback(meta, articles); | ||
if ('function' == typeof self.callback) { | ||
self.callback(meta, articles); | ||
} | ||
@@ -469,3 +469,3 @@ | ||
FeedParser.prototype._reset = function () { | ||
FeedParser.prototype._reset = function (callback) { | ||
this.meta = {}; | ||
@@ -480,4 +480,5 @@ this.articles = []; | ||
and '#name' (containing the XML element name) */ | ||
this.callback = ('function' == typeof callback) ? callback : undefined; | ||
} | ||
exports = module.exports = FeedParser; |
@@ -5,3 +5,3 @@ { | ||
"description": "Robust RSS, Atom, and RDF feed parsing using sax js", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
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
19843
464