bestiejs/lodash — pull request #129 by Rob-ot (2012-12-03 06:32:54+00:00)
Title: Throttle trailing callback

If you bound a 1s throttle to the scroll bar, then scrolled for a few seconds, then wait a few seconds, then scroll more and stop. The trailing callback won't be called.

I've included 2 tests. The first tests this specific situation. The second tests an assumption the first test makes which is that a leading callback will be called and no other calls will happen when the throttled function is called once.

I've also included the 1 line fix. :+1:

Thanks!