shama/gaze — pull request #142 by motemen (2014-07-31 04:27:35+00:00)
Title: debounce timing

Hi, I encountered a problem that when a file under watch is modified many times successively in a short period (e.g. building a file by appending), there may be a situation that the "changed" event is not emitted after the last modification ocurred. So the callback function cannot see the "final content" of the file.

This seems because that when an event ocurred, next events are blocked for `debounceDelay`ms. So I added a code trying to emit the event after the last filesystem event, even if emitting was blocked by previous event's delay.

I wonder if this is a good solution, but I'm glad if you take a look at it. Thanks.