GitShow/sindresorhus/p-whilst
sindresorhus

p-whilst

While a condition returns true, calls a function repeatedly, and then resolves the promise

by sindresorhus
Star on GitHubForknpm

JavaScript

57 stars10 forks6 contributorsQuiet · 1y agoSince 2015v3.2.0MIT

Meet the team

See all 6 on GitHub →
sindresorhus
sindresorhus19 contributions
BendingBender
BendingBender2 contributions
gabmontes
gabmontes2 contributions
Richienb
Richienb1 contribution
SharonGrossman
SharonGrossman1 contribution
tiagomapmarques
tiagomapmarques1 contribution

Languages

View on GitHub →
JavaScript87.3%
TypeScript12.7%

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 fixes

View closed PRs →
gabmontes
Accept an initial valueMergedPR

Similar to https://github.com/sindresorhus/p-do-whilst/pull/6 and related to #2. The initial value will be passed to the condition. The result of calling the action will be passed to the next call to the condition and action. The last result will be returned. Tests, types and docs were updated.

gabmontes · 1y ago
gabmontes
Minor doc improvementMergedPR

Similar to https://github.com/sindresorhus/p-do-whilst/pull/7.

gabmontes · 1y ago
SharonGrossman
support async conditionsMergedPR

Hey, wanted to add support for async condition checks. Hope this makes sense, let me know if any change is needed Thanks!

SharonGrossman · 2y ago
Structured data for AI agents

Repository: sindresorhus/p-whilst. Description: While a condition returns true, calls a function repeatedly, and then resolves the promise Stars: 57, Forks: 10. Primary language: JavaScript. Languages: JavaScript (87.3%), TypeScript (12.7%). License: MIT. Latest release: v3.2.0 (1y ago). Open PRs: 0, open issues: 0. Last activity: 1y ago. Community health: 71%. Top contributors: sindresorhus, BendingBender, gabmontes, Richienb, SharonGrossman, tiagomapmarques.

·@ofershap

Replace github.com with gitshow.dev