Skip to content

Commit

Permalink
Fixes issue Seneca-CDOT#16, add a feed parser
Browse files Browse the repository at this point in the history
  • Loading branch information
c3ho committed Nov 9, 2019
1 parent af8e02c commit f468a4c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions package.json
Expand Up @@ -19,7 +19,11 @@
"dependencies": {
"bent": "^7.0.2",
"bull": "^3.11.0",
<<<<<<< HEAD
"dotenv": "^8.2.0"
=======
"feedparser-promised": "^2.0.1"
>>>>>>> Fixes issue #16, add a feed parser
},
"devDependencies": {
"eslint": "^6.6.0",
Expand Down
7 changes: 7 additions & 0 deletions src/feed-parser.js
@@ -0,0 +1,7 @@
const feedparser = require('feedparser-promised');

// feed: url for the feed
// Accepts a url feed and parses it, on success will return an array
module.exports = async function (feed) {
return feedparser.parse(feed);
};

0 comments on commit f468a4c

Please sign in to comment.