p-fallback
Try to execute a list of promises until one succeeds.
Install
npm install p-fallback
Usage
const pFallback = ; const result = await ;
API
pFallback(promiseFunctions)
promiseFunctions
Type: Array<() => Promise>
The array of promise-returning functions to execute. An [AggregateError] is thrown if all of them fail.