# wait-for-observables

> A helper for awaiting the results of one or more Observables

Latest version **1.0.3** (published 2017-12-05) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install wait-for-observables
pnpm add wait-for-observables
yarn add wait-for-observables
bun add wait-for-observables
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2017-12-05 |
| First published | 2017-12-05 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | donvoy |
| Keywords | observable, await |

## Links

- npm: https://www.npmjs.com/package/wait-for-observables
- Repository: https://github.com/convoyinc/wait-for-observables
- Issues: https://github.com/convoyinc/wait-for-observables/issues
- npm.io page: https://npm.io/package/wait-for-observables

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^1.8.0

## Alternatives

- [promise-throttle](https://npm.io/package/promise-throttle.md) — 44.2K weekly downloads
- [@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

## Recent versions

- 1.0.3 (latest) — 2017-12-05

## README

# wait-for-observables

[![npm](https://img.shields.io/npm/v/wait-for-observables.svg)](https://www.npmjs.com/package/wait-for-observables)
[![Build Status](https://img.shields.io/circleci/project/github/convoyinc/wait-for-observables/master.svg)](https://circleci.com/gh/convoyinc/workflows/wait-for-observables)

A helper for `await`ing the results of one or more [`Observable`s](https://github.com/tc39/proposal-observable).

This is particularly handy when testing interfaces that return or consume observables.

## Usage

```ts
import waitFor from 'wait-for-observables';

describe(`observable things`, () => {

  it(`observes`, async () => {
    const [result1, result2] = await waitFor(observable1, observable2);
    // …do things with the results.
  });

});
```

An observer that completes successfully will yield `{ values: any[] }`, where `values` is an array containing an entry for each call to `next`.

Observers that fail will yield `{ error: any }`.

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