debounce a function.
Creates and returns a new debounced version of the passed function that will postpone its execution until after wait milliseconds have elapsed since the last time it was invoked.
npm install --save debounce
debounce(fn, wait, [ immediate || false ])
1 2 3 4 5 6 7