Socket
Socket
Sign inDemoInstall

rss-parser

Package Overview
Dependencies
4
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.1.4 to 3.3.0

10

lib/fields.js

@@ -18,2 +18,11 @@ const fields = module.exports = {};

'link',
'language',
'copyright',
'lastBuildDate',
'docs',
'generator',
'ttl',
'rating',
'skipHours',
'skipDays',
];

@@ -37,2 +46,3 @@

'dc:date',
'comments',
];

@@ -39,0 +49,0 @@

@@ -104,2 +104,5 @@ "use strict";

}
if (xmlObj.feed.updated) {
feed.lastBuildDate = xmlObj.feed.updated[0];
}
(xmlObj.feed.entry || []).forEach(entry => {

@@ -159,2 +162,11 @@ let item = {};

if (channel['atom:link']) feed.feedUrl = channel['atom:link'][0].$.href;
if (channel.image && channel.image[0] && channel.image[0].url) {
feed.image = {};
let image = channel.image[0];
if (image.link) feed.image.link = image.link[0];
if (image.url) feed.image.url = image.url[0];
if (image.title) feed.image.title = image.title[0];
if (image.width) feed.image.width = image.width[0];
if (image.height) feed.image.height = image.height[0];
}
utils.copyFromXML(channel, feed, feedFields);

@@ -161,0 +173,0 @@ items.forEach(xmlItem => {

6

package.json
{
"name": "rss-parser",
"version": "3.1.4",
"version": "3.3.0",
"main": "index.js",
"scripts": {
"test": "mocha --exit",
"test": "mocha",
"build": "./scripts/build.sh"

@@ -17,3 +17,3 @@ },

"express": "^4.15.4",
"mocha": "^5.2.0",
"mocha": "^3.5.3",
"puppeteer": "^1.4.0",

@@ -20,0 +20,0 @@ "webpack": "^3.5.5"

@@ -106,2 +106,3 @@ # rss-parser

* If `author` is specified, but not `dc:creator`, `creator` will be set to `author` ([see article](http://www.lowter.com/blogs/2008/2/9/rss-dccreator-author))
* Atom's `updated` becomes `lastBuildDate` for consistency

@@ -108,0 +109,0 @@ ## Options

@@ -445,6 +445,13 @@ {

],
"image": {
"link": "http://www.jn.pt",
"url": "http://www.jn.pt/favicon.ico",
"title": "Jornal de Not�cias"
},
"title": "Jornal de Not�cias - �ltimas Not�cias",
"description": "JN. Rede de Informa��o.",
"link": "http://www.jn.pt"
"link": "http://www.jn.pt",
"language": "pt-pt",
"lastBuildDate": "Wed, 03 Jan 2018 14:11:52 GMT\r\n "
}
}

@@ -97,4 +97,5 @@ {

"feedUrl": "https://github.com/gulpjs/gulp/releases.atom",
"title": "Release notes from gulp"
"title": "Release notes from gulp",
"lastBuildDate": "2015-06-01T23:49:41+02:00"
}
}

@@ -127,4 +127,5 @@ {

"feedUrl": "http://www.heise.de/developer/rss/news-atom.xml",
"title": "heise developer neueste Meldungen"
"title": "heise developer neueste Meldungen",
"lastBuildDate": "2016-02-01T17:54:50+01:00"
}
}

@@ -48,4 +48,8 @@ {

"managingEditor": "editor@oreilly.com",
"link": "http://www.oreilly.com/example/index.html"
"link": "http://www.oreilly.com/example/index.html",
"language": "en-gb",
"copyright": "Copyright 2002, Oreilly and Associates.",
"lastBuildDate": "03 Apr 02 1500 GMT",
"rating": "5"
}
}

@@ -22,4 +22,5 @@ {

"pubDate": "Fri, 13 May 2016 15:14:05 GMT",
"link": "https://localhost:8000"
"link": "https://localhost:8000",
"language": "en"
}
}

@@ -37,2 +37,5 @@ {

"link": "http://on.narro.co/f",
"language": "en",
"copyright": "All article content copyright of respective source authors.",
"ttl": "20",
"itunes": {

@@ -39,0 +42,0 @@ "image": "https://www.narro.co/images/narro-icon-lg.png",

@@ -306,2 +306,7 @@ {

"feedUrl": "https://www.reddit.com/.rss",
"image": {
"link": "https://www.reddit.com/",
"url": "https://www.redditstatic.com/reddit.com.header.png",
"title": "reddit: the front page of the internet"
},
"title": "reddit: the front page of the internet",

@@ -308,0 +313,0 @@ "description": "",

@@ -306,2 +306,7 @@ {

"feedUrl": "https://www.reddit.com/.rss",
"image": {
"link": "https://www.reddit.com/",
"url": "https://www.redditstatic.com/reddit.com.header.png",
"title": "reddit: the front page of the internet"
},
"title": "reddit: the front page of the internet",

@@ -308,0 +313,0 @@ "description": "",

@@ -159,3 +159,2 @@ "use strict";

}
server.close();
done();

@@ -187,3 +186,2 @@ });

}
server.close();
done();

@@ -190,0 +188,0 @@ })

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc