filipedeschamps / rss-feed-emitter

Super RSS News Feed aggregator written in Node.js and ES6

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"skipFirstLoad: true" Doesn't Work?

JimLynchCodes opened this issue Β· comments

commented

Hi, I am using this code:

const RssFeedEmitter = require('rss-feed-emitter');
const feeder = new RssFeedEmitter({ skipFirstLoad: true });

feeder.add({
    url: 'http://www.nintendolife.com/feeds/news',
    refresh: 2000
});


feeder.on('new-item', function (item) {
    console.log(item);
})

console.log('Feed watcher bot is listening... ')

but it returns a whole mountain of posts. I would think it shouldn't return anything but the console.log statement since the skipFirstLoad: true was passed in... πŸ€”

commented

using node v12.16.1 and rss-feed-emitter v3.1.0

commented

same result with node v11.15.0... 😒

commented

our unit tests seem to think it works fine

Can confirm this issue

I can confirm this also.

this.populateNewItemsInFeed(data);

Must be changed to this.populateNewItemsInFeed(data, firstLoad);

πŸŽ‰ This issue has been resolved in version 3.1.1 πŸŽ‰

The release is available on:

Your semantic-release bot πŸ“¦πŸš€