lib/bundle-manager.js
function resetBackoffTimer() {
	clearTimeout(backoffTimer);
	backoffTimer = setTimeout(() => {
		backoffTimer = null;
		for (const bundleName in hasChanged) {
			/* istanbul ignore if: Standard hasOwnProperty check, doesn't need to be tested */
			if (!{}.hasOwnProperty.call(hasChanged, bundleName)) {
				continue;
			}

			log.debug('Backoff finished, emitting change event for', bundleName);
			handleChange(bundleName);
		}

		hasChanged = {};
	}, 500);
}
function resetBackoffTimer() {
	clearTimeout(backoffTimer);
	backoffTimer = setTimeout(() => {
		backoffTimer = null;
		for (const bundleName in hasChanged) {
			/* istanbul ignore if: Standard hasOwnProperty check, doesn't need to be tested */
			if (!{}.hasOwnProperty.call(hasChanged, bundleName)) {
				continue;
			}

			log.debug('Backoff finished, emitting change event for', bundleName);
			handleChange(bundleName);
		}

		hasChanged = {};
	}, 500);
}
function resetBackoffTimer ( ) { clearTimeout ( backoffTimer ) ; backoffTimer = setTimeout ( ( ) => { backoffTimer = null ; for ( const bundleName in hasChanged ) { /* istanbul ignore if: Standard hasOwnProperty check, doesn't need to be tested */ if ( ! { } . hasOwnProperty . call ( hasChanged , bundleName ) ) { continue ; } log . debug ( 'Backoff finished, emitting change event for' , bundleName ) ; handleChange ( bundleName ) ; } hasChanged = { } ; } , 500 ) ; }
Resets the backoff timer used to avoid event thrashing when many files change rapidly.
Resets the backoff timer used to avoid event thrashing when many files change rapidly .