p-fallback
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

p-fallback Travis CI Build Status

Try to execute a list of promises until one succeeds.

NPM Badge

Install

npm install p-fallback

Usage

const pFallback = require("p-fallback");
 
const result = await pFallback([
    asyncOperation,
    otherAsyncOperation
]);

API

pFallback(promiseFunctions)

promiseFunctions

Type: Array<() => Promise>

The array of promise-returning functions to execute. An [AggregateError] is thrown if all of them fail.

/p-fallback/

    Package Sidebar

    Install

    npm i p-fallback

    Weekly Downloads

    0

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    3.56 kB

    Total Files

    6

    Last publish

    Collaborators

    • richienb