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

Event for once the initial load is completed

MichaelPriebe opened this issue Β· comments

It would be helpful to have an event once the initial load of all the rss feeds are completed. For example, some people might not want to do anything with the items already existing in the feeds, and could do something like this:

feeder.on('initial-load', function () {
    console.log('Waiting for something new!')
    feeder.on('new-item', function (item) {
        doSomething(item)
    })
})

Is this project abandoned other than security fixes?

@MichaelPriebe technically it's not abandoned :) I'm rearranging my work/life balance to get back to my personal projects πŸ‘

Once I'm back, probably this is the first feature I'm going to implement. The interface probably is going to be different than you suggested. What if you could instantiate the emitter with an option to ignore the first load?

For example:

let feeder = new RssFeedEmitter({ skipFirstLoad: true })

It would work for my case, but some people still might want the initial items, but need to know WHEN it switches from initial items to new items.

commented

Can we get an update on this? I'd love to use this package without the initial response. :)

commented

hey @Vezqi, i'm working on adding both the case and the event keyed like... initial-load:${feed.url} with #184

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

The release is available on:

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