# jquery-whenall

> A patient version of jQuery.when() that waits for all its input promises to have a final state before resolving/rejecting the composite returned promise. Also supports 'progress' notifications.

Latest version **0.1.5** (published 2017-03-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install jquery-whenall
pnpm add jquery-whenall
yarn add jquery-whenall
bun add jquery-whenall
```

## 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.1.5 |
| Published | 2017-03-01 |
| First published | 2016-07-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | galbi101 |
| Keywords | jquery, jquery-plugin, when, promise, promises, progress, whenall, when all |

## Links

- npm: https://www.npmjs.com/package/jquery-whenall
- Repository: https://github.com/galbi101/jquery-whenall
- Issues: https://github.com/galbi101/jquery-whenall/issues
- npm.io page: https://npm.io/package/jquery-whenall

## Dependencies (1)

- [jquery](https://npm.io/package/jquery.md) >=1.7

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 0.1.5 (latest) — 2017-03-01
- 0.1.4 — 2016-07-29
- 0.1.3 — 2016-07-29
- 0.1.2 — 2016-07-05
- 0.1.1 — 2016-07-04
- 0.1.0 — 2016-07-04

## README

# jQuery.whenAll()

**`$.whenAll()`** is a small utility function that, like `$.when()` that it decorates,
aggregates multiple promises into a single promise, but unlike the later, it **always waits** for all promises
to have a final state, either resolved or rejected, before finalizing the returned promise.

The function also supports the unique jQuery Deferred `progress` notifications and implements its own notifying rules
for the returned promise (see the respective comment in [Usage](#usage)).

## Installation

```sh
$ npm install jquery-whenall
```

## Usage

```js
$.whenAll(promise1, promise2) // promise3, ...
	.done(function() {
		// Called when all promises are resolved
	})
	.fail(function() {
		/*
		 Called when all promises have a final state (resolved/rejected),
		 and at least one of them is rejected.
		 */
	})
	.always(function() {
		// Called when all promises have a final state (resolved/rejected)
	})
	.progress(function() {
		/*
		 Initially called when at least one promise notified a "progress"
		 by deferred.notify(), and all other promises are either
		 resolved/rejected/progressed.
		 After that, this callback will continue to be invoked for each
		 individual pending promise "progress" notification, until all
		 of them are finalized.
		 */
	});
```

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