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