firebase/angularfire — pull request #486 by jamestalmage (2014-11-25 05:04:49+00:00)
Title: Fix: utils.debounce timing corner case.

Invocations of the debounced method between when `runNow` is scheduled
and when it actually runs will schedule additional `runNow` invocations
to be executed in rapid succession.

Also includes a few clarifications in the comments. A few comments copied from batch didn't make sense in the debounce method. Also, IMO the words `immediate` implies synchronous execution so I changed it to `next tick`.

I made similar changes to batch (the same problem existed there). I was able to write tests for my changes to debounce, but how to write a similar test for my changes to batch eludes me.