How to use the p-any.AggregateError function in p-any

To help you get started, we’ve selected a few p-any examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github koajs / jwt / lib / index.js View on Github external
.catch(function (err) {
                    if (err instanceof pAny.AggregateError) {
                        for (const e of err) {
                            throw e;
                        }
                    } else {
                        throw err;
                    }
                });

p-any

Wait for any promise to be fulfilled

MIT
Latest version published 4 years ago

Package Health Score

56 / 100
Full package analysis

Popular p-any functions