Subversion Repositories SmartDukaan

Rev

Rev 30599 | Rev 30725 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 30599 Rev 30694
Line 910... Line 910...
910
			b = isNaN(b) ? 0 : b;
910
			b = isNaN(b) ? 0 : b;
911
		}
911
		}
912
 
912
 
913
		return a + b;
913
		return a + b;
914
	}, 0);
914
	}, 0);
915
});
-
 
916
915
});
-
 
916
 
-
 
917
const debounce = (func, delay) => {
-
 
918
	let debounceTimer
-
 
919
	return function () {
-
 
920
		const context = this
-
 
921
		const args = arguments
-
 
922
		clearTimeout(debounceTimer)
-
 
923
		debounceTimer
-
 
924
			= setTimeout(() => func.apply(context, args), delay)
-
 
925
	}
-
 
926
}
-
 
927