Option to only emit new
TobiTenno opened this issue · comments
Matt 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.
Dmitry Antonov commented
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
}
})
Matt commented
I already do that, it would simply be a nice option.
Matt commented
other issues are bigger problems, i'll close this