Return a debounced version of the given function
$ npm install debounce-fn
var debounce = require('debounce-fn')
var yo = debounce(printYo, 300) // debounce for 300ms. if second argument is not passed, default is 250ms.
yo()
yo()
yo()
setTimeout(yo, 300)
// first two calls will be debounced, and will give two outputs:
// "yo"
// "yo"
function printYo () {
console.log('yo')
}