GitShow/sindresorhus/p-debounce
sindresorhus

p-debounce

Debounce promise-returning & async functions

by sindresorhus
Star on GitHubForknpm

JavaScript

237 stars26 forks7 contributorsQuiet · 7mo agoSince 2016v5.1.0MIT

Meet the team

See all 7 on GitHub →
sindresorhus
sindresorhus21 contributions
Richienb
Richienb4 contributions
BendingBender
BendingBender2 contributions
darcyparker
darcyparker1 contribution
fregante
fregante1 contribution
Rafael09ED
Rafael09ED1 contribution
matamatanot
matamatanot1 contribution

Community health

4 of 6 standards met

Community profile →
71
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Quiet · 1 in progress · Last activity 7mo ago
See all on GitHub →
sindresorhus
Add recipe for autosavingOpenPR

Fixes #31 // @Richienb

sindresorhus · 4mo ago
Richienb
Add autosave recipeOpenIssue

Is this usually leading/trailing bounce? wait for save to finish and incorporate in delay?

Richienb · 7mo ago
Richienb
Add `wait` option to `pDebounce.promise`OpenIssue

When , If the promise finishes quickly, we want to wait a bit anyways before calling the API again. The option should include the time to execute the promise in the time counted. Workaround, using :

Richienb · 7mo ago

Recent fixes

View closed PRs →
sindresorhus
Add `after` option to `pDebounce.promise()`MergedPR

Fixes #28

sindresorhus · 8mo ago
Richienb
`after` option for `pDebounce.promise`ClosedIssue

Imagine we are trying to debounce a function. This means, the last call to should always go through. The current behaviour of is to ignore all subsequent calls. I would like an option that ensures the last call to the function always goes through. For , after each debounce period, the most recent call is executed, and not thrown away. For , the returned promise waits for the current promise to resolve, and either returns its value, or runs itself depending on whether there are more queued runs.

Richienb · 8mo ago
lehni
Handling exceptions?ClosedIssue

I am wondering if exception handling could be added to this library? And if so, what the policy should be about rejecting the waiting promises? If all of them are rejected, then it will look like the error happened many times?

lehni · 9mo ago
Structured data for AI agents

Repository: sindresorhus/p-debounce. Description: Debounce promise-returning & async functions Stars: 237, Forks: 26. Primary language: JavaScript. License: MIT. Latest release: v5.1.0 (8mo ago). Open PRs: 1, open issues: 3. Last activity: 7mo ago. Community health: 71%. Top contributors: sindresorhus, Richienb, BendingBender, darcyparker, fregante, Rafael09ED, matamatanot.

·@ofershap

Replace github.com with gitshow.dev