rss-parser
Advanced tools
Comparing version 2.10.0 to 2.10.1
@@ -247,4 +247,6 @@ 'use strict'; | ||
return parseRSS2(result, options, callback); | ||
} else if (result['rdf:RDF']) { | ||
return parseRSS1(result, options, callback); | ||
} else { | ||
return parseRSS1(result, options, callback); | ||
return callback(new Error("Feed not recognized as RSS 1 or 2.")) | ||
} | ||
@@ -251,0 +253,0 @@ }); |
{ | ||
"name": "rss-parser", | ||
"version": "2.10.0", | ||
"version": "2.10.1", | ||
"main": "index.js", | ||
@@ -18,3 +18,3 @@ "scripts": { | ||
"entities": "^1.1.1", | ||
"xml2js": "^0.4.15" | ||
"xml2js": "^0.4.17" | ||
}, | ||
@@ -21,0 +21,0 @@ "directories": { |
# rss-parser | ||
[![Build Status](https://travis-ci.org/bobby-brennan/rss-parser.svg?branch=master)](https://travis-ci.org/bobby-brennan/rss-parser) | ||
## Installation | ||
@@ -4,0 +6,0 @@ You can install via npm or bower: |
@@ -0,1 +1,3 @@ | ||
"use strict"; | ||
var FS = require('fs'); | ||
@@ -71,2 +73,9 @@ | ||
it('should throw error for unrecognized', function(done) { | ||
Parser.parseFile(__dirname + '/input/unrecognized.rss', (err, parsed) => { | ||
Expect(err.message).to.contain('Feed not recognized as RSS'); | ||
done(); | ||
}) | ||
}) | ||
it('should parse custom fields', function(done) { | ||
@@ -81,4 +90,4 @@ var options = { | ||
Expect(err).to.equal(null); | ||
let str = JSON.stringify(parsed, null, 2); | ||
let outfile = OUT_DIR + '/customfields.json'; | ||
var str = JSON.stringify(parsed, null, 2); | ||
var outfile = OUT_DIR + '/customfields.json'; | ||
if (process.env.WRITE_GOLDEN) { | ||
@@ -85,0 +94,0 @@ FS.writeFileSync(outfile, str); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
1595762
36
18693
116
Updatedxml2js@^0.4.17