Closed wholenews closed 3 years ago
The concurrency
option in p-settle
should work: https://github.com/sindresorhus/p-settle/blob/071020fc6cd7884e74228d546943f53cbc3ca28c/test.js#L31 And if not, that's a bug.
You could also use https://github.com/sindresorhus/p-reflect with p-map
.
Ah, you're right p-settle
does work as intended. I must have misinterpreted the data. Thanks for a quick response!
Should be able to get both resolved values, and aggregate error, like in
p-settle
. I'm looking for the combination ofp-settle
andp-map
which seems not to exist...With
p-settle
(even when supplying function) it's called immediately. In my case this starts all the requests at once.With
p-map
it throttles the requests according toconcurrency
but there is no way to get the resolved results if any request fails.