Throttle packaging method:
Export function Throttle (the callback) { var iNow = 0 ; return (value) => { var lastINow = new new a Date () .getTime (); IF (lastINow -iNow> 300 ) { the callback (value); iNow = new new a Date ( ) .getTime (); } } } // methods used throttling package search // incorporated in the search
Use throttle:
You can not read can watch the video.