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

Option to only emit new

TobiTenno opened this issue · comments

commented

An option for only emitting events that occur after the emitter finishes starting would help reduce some startup thrashing for people that don't want to store ids.

It's pretty easy to do like so (taken from my yt comments bot):

const timeStartup = Date.now()
feed.on('message', data => {

	var time = Date.parse(data.snippet.publishedAt)
	if (time > timeStartup) {
        // post it
	}

})
commented

I already do that, it would simply be a nice option.

commented

other issues are bigger problems, i'll close this