# promise-all

> A Promise.all but for Objects as well as Arrays

Latest version **1.0.0** (published 2015-09-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install promise-all
pnpm add promise-all
yarn add promise-all
bun add promise-all
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-09-14 |
| First published | 2015-09-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Joakim Carlstein |
| Maintainers | joakimbeng |
| Keywords | promise, all, promise.all, object, functional |

## Links

- npm: https://www.npmjs.com/package/promise-all
- Repository: https://github.com/joakimbeng/promise-all
- Homepage: https://github.com/joakimbeng/promise-all#readme
- Issues: https://github.com/joakimbeng/promise-all/issues
- npm.io page: https://npm.io/package/promise-all

## Dependencies (1)

- [is-plain-object](https://npm.io/package/is-plain-object.md) ^2.0.1

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2015-09-14

## README

# promise-all

[![Build status][travis-image]][travis-url] [![NPM version][npm-image]][npm-url] [![js-xo-style][codestyle-image]][codestyle-url]

> A Promise.all but for Objects as well as Arrays

## Installation

Install `promise-all` using [npm](https://www.npmjs.com/):

```bash
npm install --save promise-all
```

## Usage

### Module usage

```javascript
var all = require('promise-all');

all({key1: Promise.resolve(false)})
  .then(function (val) {
    // val === {key1: false}
  });

all([Promise.resolve(false)])
  .then(function (val) {
    // val === [false]
  });
```

## API

### `all(val)`

| Name | Type | Description |
|------|------|-------------|
| `val` | `Array|Object`| An Object or Array of promises to resolve |

Returns: `Promise`, which resolves when all promises in the passed Object or Array are resolved.

## Related

* [`promise-or`](https://github.com/joakimbeng/promise-or)
* [`promise-and`](https://github.com/joakimbeng/promise-and)
* [`promise-not`](https://github.com/joakimbeng/promise-not)
* [`promise-if`](https://github.com/joakimbeng/promise-if)

## License

MIT © Joakim Carlstein

[npm-url]: https://npmjs.org/package/promise-all
[npm-image]: https://badge.fury.io/js/promise-all.svg
[travis-url]: https://travis-ci.org/joakimbeng/promise-all
[travis-image]: https://travis-ci.org/joakimbeng/promise-all.svg?branch=master
[codestyle-url]: https://github.com/sindresorhus/xo
[codestyle-image]: https://img.shields.io/badge/code%20style-xo-brightgreen.svg?style=flat

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