You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The array can contain a mix of any value, promise, and async function. Promises are awaited. Async functions are executed and awaited. The concurrency option only works for elements that are async functions.
options
Type: object
concurrency
Type: number (Integer)
Default: Infinity
Minimum: 1
The number of concurrently pending promises.
Note: This only limits concurrency for elements that are async functions, not promises.
isFulfilled(object)
This is a type guard for TypeScript users.
This is useful since await pSettle(promiseArray) always returns a PromiseResult[]. This function can be used to determine whether PromiseResult is PromiseFulfilledResult or PromiseRejectedResult.
isRejected(object)
This is a type guard for TypeScript users.
This is useful since await pSettle(promiseArray) always returns a PromiseResult[]. This function can be used to determine whether PromiseResult is PromiseRejectedResult or PromiseFulfilledResult.
Related
p-reflect - Make a promise always fulfill with its actual fulfillment value or rejection reason