documentcloud/underscore — Issue #346: Debounce ASAP
Author: straps
Created: 2011-10-24 09:31:30+00:00
State: open

Hi, it will be useful to have an ASAP additional parameter to debounce, default to false.

I, and think many others, use debounce for preventing buttons double click, but It has no sense to wait for 100 or 500 ms before firing the click event. I mean something like.

_.debounce(fn, 300, true);

fn is called on first click; following clicks have to wait for at least 300ms