debounceTime
RxJS 5 debounceTime
by mpsingh2003
HTML
<script src="https://npmcdn.com/@reactivex/[email protected]/dist/global/Rx.umd.js"></script>
<body>
<input type="text" id="example" oninput="myFunction()"/>
<div>
<span>Result is: </span> <span id="result"></span>
</div>
</body>
JavaScript
var timer = null;
var myFunction = function(e){
if (timer) {
clearTimeout(timer);
timer = null;
}
timer = setTimeout(() => {
document..getElementByid
}, 800);
}