Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

feedparser

Package Overview
Dependencies
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

feedparser - npm Package Compare versions

Comparing version 2.2.9 to 2.2.10

20

History.md
2.2.10 / 2020-05-01
==================
* Changes a direct use of hasOwnProperty builtin to call it from Object.prototype instead
* Update mri
* Update readable-stream
* Update npm audit fixes
* Remove unused Makefile
* Update examples to use node-fetch in place of request
* Update mocha v7
* Update eslint v6
* Replace iconv with iconv-lite
* Update travis config; drop support for unmaintained node versions
* Merge pull request #271 from jakutis/readme-use-https
* README: make links use https: instead of http: protocol
* Update copyright
* Update README
* Merge pull request #255 from danmactough/greenkeeper/mocha-5.0.0
* chore(package): update mocha to version 5.0.0
2.2.9 / 2018-01-27

@@ -3,0 +23,0 @@ ==================

4

lib/feedparser/index.js
/**********************************************************************
node-feedparser - A robust RSS, Atom, RDF parser for node.
http://github.com/danmactough/node-feedparser
Copyright (c) 2011-2016 Dan MacTough and contributors
Copyright (c) 2011-2018 Dan MacTough and contributors
http://mact.me

@@ -348,3 +348,3 @@

}
if (!this.stack[0].hasOwnProperty(stdEl)) {
if (!Object.prototype.hasOwnProperty.call(this.stack[0], stdEl)) {
this.stack[0][stdEl] = n;

@@ -351,0 +351,0 @@ } else if (this.stack[0][stdEl] instanceof Array) {

@@ -8,3 +8,3 @@ {

},
"version": "2.2.9",
"version": "2.2.10",
"keywords": [

@@ -36,3 +36,3 @@ "rss",

"engines": {
"node": ">= 4.2.0"
"node": ">= 10.18.1"
},

@@ -46,11 +46,11 @@ "dependencies": {

"lodash.uniq": "^4.5.0",
"mri": "^1.1.0",
"readable-stream": "^2.2.2",
"mri": "^1.1.5",
"readable-stream": "^2.3.7",
"sax": "^1.2.4"
},
"devDependencies": {
"eslint": "^4.8.0",
"iconv": "^2.3.0",
"mocha": "^4.0.1",
"request": "^2.83.0"
"eslint": "^6.8.0",
"iconv-lite": "^0.5.1",
"mocha": "^7.1.2",
"node-fetch": "^2.6.0"
},

@@ -62,3 +62,13 @@ "scripts": {

"version": "git changelog ; git add History.md"
},
"mocha": {
"require": "./test/common.js",
"globals": [
"assert",
"fs",
"FeedParser"
],
"reporter": "spec",
"timeout": 5000
}
}

@@ -15,3 +15,3 @@ # Feedparser - Robust RSS, Atom, and RDF feed parsing in Node.js

1. It resolves relative URLs (such as those seen in Tim Bray's "ongoing" [feed](http://www.tbray.org/ongoing/ongoing.atom)).
1. It resolves relative URLs (such as those seen in Tim Bray's "ongoing" [feed](https://www.tbray.org/ongoing/ongoing.atom)).
2. It properly handles XML namespaces (including those in unusual feeds

@@ -30,3 +30,3 @@ that define a non-default namespace for the main feed elements).

**Please** also review the [compressed example](examples/compressed.js) for a
**Please** also review the [complete example](examples/complete.js) for a
thorough working example that is a suitable starting point for your app.

@@ -37,20 +37,17 @@

var FeedParser = require('feedparser');
var request = require('request'); // for fetching the feed
var fetch = require('node-fetch'); // for fetching the feed
var req = request('http://somefeedurl.xml')
var req = fetch('http://somefeedurl.xml')
var feedparser = new FeedParser([options]);
req.on('error', function (error) {
// handle any request errors
});
req.on('response', function (res) {
var stream = this; // `this` is `req`, which is a stream
if (res.statusCode !== 200) {
this.emit('error', new Error('Bad status code'));
req.then(function (res) {
if (res.status !== 200) {
throw new Error('Bad status code');
}
else {
stream.pipe(feedparser);
// The response `body` -- res.body -- is a stream
res.body.pipe(feedparser);
}
}, function (err) {
// handle any request errors
});

@@ -75,3 +72,3 @@

You can also check out this nice [working demo](https://github.com/scripting/feedParserDemo).
You can also check out this nice [working implementation](https://github.com/scripting/feedRead) that demonstrates one way to handle all the hard and annoying stuff. :smiley:

@@ -112,3 +109,3 @@ ### options

Feedparser is a [transform stream](http://nodejs.org/api/stream.html#stream_class_stream_transform) operating in "object mode": XML in -> Javascript objects out.
Feedparser is a [transform stream](https://nodejs.org/api/stream.html#stream_class_stream_transform) operating in "object mode": XML in -> Javascript objects out.
Each readable chunk is an object representing an article in the feed.

@@ -190,3 +187,3 @@

* categories (an Array of Strings)
* source (an Object containing `url` and `title` properties pointing to the original source for an article; see the [RSS Spec](http://cyber.law.harvard.edu/rss/rss.html#ltsourcegtSubelementOfLtitemgt) for an explanation of this element)
* source (an Object containing `url` and `title` properties pointing to the original source for an article; see the [RSS Spec](https://cyber.law.harvard.edu/rss/rss.html#ltsourcegtSubelementOfLtitemgt) for an explanation of this element)
* enclosures (an Array of Objects, each representing a podcast or other enclosure and having a `url` property and possibly `type` and `length` properties)

@@ -211,3 +208,3 @@ * meta (an Object containing all the feed meta properties; especially handy when using the EventEmitter interface to listen to `article` emissions)

Copyright (c) 2011-2016 Dan MacTough and contributors
Copyright (c) 2011-2020 Dan MacTough and contributors

@@ -214,0 +211,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc