1var debounce = function(wait, func, immediate) { 2 var timeout; 3 return function() { 4 var context = this, args = arguments; 5 var later = function() { 6 timeout = null; 7 if (!immediate) func.apply(context, args); 8 }; 9 var callNow = immediate && !timeout; 10 clearTimeout(timeout); 11 timeout = setTimeout(later, wait); 12 if (callNow) func.apply(context, args); 13 }; 14} 15 16window.galleries = window.galleries || {}; 17window.galleries.debounce = debounce; 18export default debounce;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.