author : Austin Ruby
 *  function changelog function debounce ( func , wait , immediate ) { let timeout ; return function ( ... args ) { const later = function ( ) { timeout = null ; if ( ! immediate ) func ( ... args ) ; } ; const callNow = immediate && ! timeout ; if ( timeout ) clearTimeout ( timeout ) ; timeout = setTimeout ( later , wait ) ; if ( callNow ) func ( ... args ) ; } ; } module . exports = debounce ;