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 5c27e1f commit 0b90289
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -18,7 +18,8 @@
"homepage": "https://github.com/Seneca-CDOT/telescope#readme",
"dependencies": {
"bent": "^7.0.2",
"bull": "^3.11.0"
"bull": "^3.11.0",
"feedparser-promised": "^2.0.1"
},
"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 0b90289

Please sign in to comment.