I use underscore.js to run task.
_.debounce(task, 100)
How stop executing _.debounce
?
I use underscore.js to run task.
_.debounce(task, 100)
How stop executing _.debounce
?
_.debounce
does not execute anything, so you cannot stop it. It returns a new function which takes care of the debouncing.
If you don't want to use it anymore, just use the original function.
Have a look at the documentation for more information.
I assume you want to slow down an expensive task, i've written a post here to explain the _.debounce()
method behaviour.
Cheers
PS....archived post