Comparing version 0.0.3 to 0.0.4
@@ -26,5 +26,3 @@ //feed.js | ||
var req = request(options, function (err, response, xml) { | ||
if (response.statusCode >= 400) { | ||
callback("Failed to retrieve source! Invalid response code (" + response.statusCode + ")!", null); | ||
} else if (err || xml === null) { | ||
if (err || xml === null) { | ||
if (err) { | ||
@@ -36,3 +34,11 @@ callback(err, null); | ||
} else { | ||
parseString(xml, options, callback); | ||
if ((typeof response !== "undefined" && response !== null ? response.statusCode : void 0) != null) { | ||
if (response.statusCode >= 400) { | ||
callback("Failed to retrieve source! Invalid response code (" + response.statusCode + ")!", null); | ||
} else { | ||
parseString(xml, options, callback); | ||
} | ||
} else { | ||
callback("Failed to retrieve source! No response code!!", null); | ||
} | ||
} | ||
@@ -39,0 +45,0 @@ }); |
{ | ||
"name": "rssparser", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"dependencies": { | ||
@@ -5,0 +5,0 @@ "xml2js": { |
{ | ||
"name": "rssparser", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "rssparser is an all purpose RSS/ATOM feed parser that parses feeds into a JSON format.", | ||
@@ -29,4 +29,4 @@ "keywords": [ | ||
"readmeFilename": "README.md", | ||
"_id": "rssparser@0.0.3", | ||
"_id": "rssparser@0.0.4", | ||
"_from": "rssparser" | ||
} |
@@ -6,2 +6,4 @@ node-rssparser | ||
[![build status](https://secure.travis-ci.org/tk120404/node-rssparser.png)](http://travis-ci.org/tk120404/node-rssparser) | ||
Installing | ||
@@ -8,0 +10,0 @@ ---------- |
@@ -0,0 +0,0 @@ // string test.js |
6
470
87
17463