throttle function implements as debounce
- Dominant language
- JavaScript
- Stars
- 38.2k
- Forks
- 6.6k
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/impress/impress.js/blob/master/src/lib/util.js#L65-L74
```javascript
var throttle = function( fn, delay ) {
var timer = null;
return function() {
var context = this, args = arguments;
window.clearTimeout( timer );
timer = window.setTimeout( function() {
fn.apply( context, args );
}, delay );
};
};
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with src/lib/util.js lines 65-74 and inspect how the throttle utility is used elsewhere in the project. Compare the reported behavior with the expected throttle behavior, then verify that the utility no longer acts like a debounce and that existing callers still work correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100