Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ability to clear timer #10

Merged
merged 2 commits into from
Jul 9, 2016

Conversation

benjamincarp
Copy link

This pull request adds a property to the function returned by debounce which can be called to clear the timer and prevent scheduled future executions. It addresses #9 which I did not write but I did need the same functionality.

@vendethiel
Copy link
Contributor

Hi,

please add some tests for this feature, so I can merge your PR :).

@benjamincarp
Copy link
Author

Done. I added both a basic clear link as well as a link to trigger the event immediately and clear the timer at the same time (trivial but this was the real use case I wanted to add the feature for, so it seemed good to demonstrate).

@vendethiel vendethiel merged commit 46c9e35 into sindresorhus:master Jul 9, 2016
@vendethiel
Copy link
Contributor

Thanks!

@nathanbuchar
Copy link

Just came across this debounce package because I don't need the weight of underscore, and this is the exact functionality I've been looking for! However, the .clear command has not yet been published to npm. Any idea when this will be?

Thanks :)

@vendethiel
Copy link
Contributor

@nathanbuchar I'm afraid I don't have the npm publish rights on this package.

@vendethiel
Copy link
Contributor

@jonathanong hi?

@nathanbuchar
Copy link

Any progress on this? :\

@jonathanong
Copy link

i don't have access either. seems like you have to ask @TooTallNate

@vendethiel
Copy link
Contributor

You don't? Isn't jongleberry yours?

@vendethiel
Copy link
Contributor

Or do you mean owner access

@jonathanong
Copy link

oh crap i was reading it wrong. who am i giving access to?

@nathanbuchar
Copy link

We just need this change to be pushed to npm is all :)

@vendethiel
Copy link
Contributor

@jonathanong you can add me&I'll push it.

@vendethiel
Copy link
Contributor

@nathanbuchar btw, if you're using component, it uses github tag (and the 1.0.1 exists)

@coreymaher
Copy link

Any updates on this? I'd love to be able to use the new clear feature on the npm version.

@benjamincarp
Copy link
Author

@TooTallNate are there any plans to update the npm package to release 1.0.1 which includes this fix?

@nathanbuchar
Copy link

Still waiting for this to be published :\…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants