GitShow/sindresorhus/p-debounce
sindresorhus

p-debounce

Debounce promise-returning & async functions

by sindresorhus
Star on GitHubForknpm

JavaScript

238 stars26 forks7 contributorsQuiet · 9mo 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

Languages

View on GitHub →
JavaScript98.5%
TypeScript1.5%

Commit activity

Last 12 weeks · 0 commits

Full graph →

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 9mo ago
See all on GitHub →
sindresorhus
Add recipe for autosavingOpenPR

Fixes #31 // @Richienb

sindresorhus · 6mo ago
Richienb
Add autosave recipeOpenIssue

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

Richienb · 9mo 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 · 9mo ago

Recent fixes

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

Fixes #28

sindresorhus · 10mo 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 · 10mo 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 · 11mo ago
Structured data for AI agents

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

·@ofershap

Replace github.com with gitshow.dev