sindresorhus / promise-fun

Promise packages, patterns, chat, and tutorials

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

p-map for a function or p-whilst with concurrency

gsouf opened this issue · comments

Hi,

Is there any package here that works like p-map but with a function instead of an array? Or like p-whislt with concurency.

Something that takes a function returning a promise or null. As long as the function returns a promise then it keeps going with concurency managed.

Like this package https://www.npmjs.com/package/es6-promise-pool

Thanks

Nothing exactly like that, but you can achieve it with https://github.com/sindresorhus/p-limit

Thanks, p-limit does not seem to be what I'm looking for, I'll do some wrapper around p-queue.