npm install promise-debounce
var debounce = ;
var getStatus = ;// The three following calls will cause only a single AJAX request...;;;
Returns a debounced version of
fn with optional calling context
fn must be a function which returns a promise.
debounced is called and no other call is currently pending,
fn will be called and its promise returned. Otherwise - if another call is pending - the original promise will be returned.