GitShow/sindresorhus/promise-fun
sindresorhus

promise-fun

Promise packages, patterns, chat, and tutorials

by sindresorhus
asyncasync-awaitasync-functionsawesomeawesome-listconcurrencyiterationjavascript
Star on GitHubFork
5.1k stars137 forks7 contributorsQuiet · 2y agoSince 2016CC0-1.0

Meet the team

See all 7 on GitHub →
sindresorhus
sindresorhus28 contributions
Richienb
Richienb3 contributions
kevva
kevva2 contributions
benjamingr
benjamingr1 contribution
tychenjiajun
tychenjiajun1 contribution
TehShrike
TehShrike1 contribution
yakov116
yakov1161 contribution

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 →
LumaKernel
p-* version for promise-queue(max-concurrent=1, max-lenght=1)ClosedIssue

It's useful for the situation like "queue some processing like building up to 1, and do not run at the same time". naming candidates I didn't came up with good name. p-serial implementation with promise-queue implementation from scratch NOTE: this is fully written by me and publishing under public domain. usage example is only shown 2 times. vs others vs : this will run all queued promises. vs : this will run concurrently vs : no option to limit max length vs : easy for the specific case

LumaKernel · 8mo ago
jdmarshall
Do you have any suggestions on applying 'nice' to projects?ClosedIssue

Hey Sindre, I'm trying to make sure some 2nd priority code doesn't block the event loop to the exclusion of forward progress on customer-facing tasks. To do that I need to break up long loops to make sure they don't monopolize the event loop. Your throttling library is not quite right, because I don't want to limit operations per second, I want to guarantee idle time. There's no number that would be accurate for all cps or all tasks. What I really want to do is throttle the work to perhaps 50ms out of every 200 ms. What are my options for making this an async task?

jdmarshall · 8mo ago
JQuezada0
[Question] - Is there a p-* lib that can queue a number of promises for a given interval, and then dequeue them in batches?ClosedIssue

Basically what the title says. I see many ways to hold promises given some condition/time, but I'm wondering if there's any way to get the total promises that were queued as a batch? If not, I think it should be possible to use to dequeue the amount of times equal to the size of the queue.

JQuezada0 · 1y ago
Structured data for AI agents

Repository: sindresorhus/promise-fun. Description: Promise packages, patterns, chat, and tutorials Stars: 5149, Forks: 137. License: CC0-1.0. Topics: async, async-await, async-functions, awesome, awesome-list, concurrency, iteration, javascript, list, nodejs, polyfill, ponyfill, promise, promise-library, promise-modules, promise-patterns, promise-queue, promises, resources, unicorns. Open PRs: 0, open issues: 0. Last activity: 2y ago. Community health: 71%. Top contributors: sindresorhus, Richienb, kevva, benjamingr, tychenjiajun, TehShrike, yakov116.

·@ofershap

Replace github.com with gitshow.dev