mirror of
https://github.com/Brandon-Rozek/Rozbot.git
synced 2024-11-07 20:30:34 -05:00
14 lines
288 B
JavaScript
14 lines
288 B
JavaScript
var feed = require('feed-read');
|
|
var promise = require('promise-polyfill');
|
|
|
|
module.exports = function(link) {
|
|
return new promise(function(resolve, reject) {
|
|
feed(link, function(error, articles) {
|
|
if (error) {
|
|
reject(error);
|
|
} else {
|
|
resolve(articles);
|
|
}
|
|
});
|
|
});
|
|
}
|