filipedeschamps/rss-feed-emitter

Option to only emit new

TobiTenno opened this issue · 3 comments

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
	}

})

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

other issues are bigger problems, i'll close this