# p-all-with-failures

> Wrapper on promise all for returning failures

Latest version **0.0.3** (published 2019-03-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install p-all-with-failures
pnpm add p-all-with-failures
yarn add p-all-with-failures
bun add p-all-with-failures
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2019-03-14 |
| First published | 2019-03-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 139.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Mohit Yadav |
| Maintainers | mohit21js |

## Links

- npm: https://www.npmjs.com/package/p-all-with-failures
- Repository: https://github.com/Mohit21GoJs/p-all-with-failures
- Homepage: https://github.com/Mohit21GoJs/p-all-with-failures#readme
- Issues: https://github.com/Mohit21GoJs/p-all-with-failures/issues
- npm.io page: https://npm.io/package/p-all-with-failures

## Recent versions

- 0.0.3 (latest) — 2019-03-14
- 0.0.2 — 2019-03-09

## README

# p-all-with-failures
A wrapper for using promise all with failures.

[![Build Status](https://travis-ci.org/Mohit21GoJs/p-all-with-failures.svg?branch=master)](https://travis-ci.org/Mohit21GoJs/p-all-with-failures) [![Coverage Status](https://coveralls.io/repos/github/Mohit21GoJs/p-all-with-failures/badge.svg?branch=master)](https://coveralls.io/github/Mohit21GoJs/p-all-with-failures?branch=master)



### For running locally ###
`yarn install`

### For running tests ###
`yarn test`

### Usage ###

Pass in array of objects having key `func` as a thennable and `failureCb` as a callback function which can operate on error passed in if promise fails.

#### For example ####

`[{ func: Promise.resolve({some: 'value'})}, { func: Promise.reject({ message: 'Error'}), failureCb: (err) => err.message}] returns [{some: 'value'}, 'Error']` 

If we were to use Promise.all with . `[Promise.resolve({some: 'value'}), Promise.reject({ message: 'Error'})]` would result in rejection with error message.

---
_Source: https://npm.io/package/p-all-with-failures · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
