const debounce = ( callback , wait ) => { let timeoutId ; return ( args ) => { if ( timeoutId ) clearTimeout ( timeoutId ) ; timeoutId = setTimeout ( ( ) => { callback . apply ( null , args ) ; } , wait ) ; } ; } ; export default debounce ;