filipedeschamps / rss-feed-emitter

Super RSS News Feed aggregator written in Node.js and ES6
MIT License
1.06k stars 77 forks source link

Event for once the initial load is completed #170

Closed mikuhl-dev closed 4 years ago

mikuhl-dev commented 6 years ago

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)
    })
})
mikuhl-dev commented 5 years ago

Is this project abandoned other than security fixes?

filipedeschamps commented 5 years ago

@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 })
mikuhl-dev commented 5 years ago

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.

jdmremi commented 5 years ago

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

TobiTenno commented 4 years ago

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

filipedeschamps commented 4 years ago

:tada: This issue has been resolved in version 3.1.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: