# ObservableQueue

> ObservableQueue help you to create a queue of observable to be executed with a limit of simultaneous process and wait for all them to finish before to trigger a finale callback function.

Latest version **0.0.5** (published 2016-10-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install ObservableQueue
pnpm add ObservableQueue
yarn add ObservableQueue
bun add ObservableQueue
```

## 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.5 |
| Published | 2016-10-10 |
| First published | 2016-10-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Alexandre Piel |
| Maintainers | apiel |

## Links

- npm: https://www.npmjs.com/package/ObservableQueue
- Repository: https://github.com/apiel/ObservableQueue
- Issues: https://github.com/apiel/ObservableQueue/issues
- npm.io page: https://npm.io/package/ObservableQueue

## Dependencies (2)

- [rx](https://npm.io/package/rx.md) ^4.1.0
- [typescript](https://npm.io/package/typescript.md) ^1.8.10

## Recent versions

- 0.0.5 (latest) — 2016-10-10
- 0.0.4 — 2016-10-07
- 0.0.3 — 2016-10-07
- 0.0.2 — 2016-10-07
- 0.0.1 — 2016-10-06

## README

# ObservableQueue

ObservableQueue help you to create a queue of observable to be executed with a limit of simultaneous process and wait for all them to finish before to trigger a finale callback function.

        import { Observable } from 'rx';
        import { ObservableQueue } from './../ObservableQueue';

        var obs = Observable.create(function(observer) {
                console.log('start ' + (new Date).toLocaleTimeString());
                setTimeout(function() {
                        observer.onNext({'hello': 'world'});
                        observer.onCompleted();
                }, 1000);
        });

        // Here allow only 2 observer at the same time
        let observableQueue = new ObservableQueue(() => console.log('completed'), 2);
        observableQueue.subscribe(obs, data => console.log(data), null, () => console.log('hi ' + (new Date).toLocaleTimeString()));
        observableQueue.subscribe(obs, data => console.log(data), null, () => console.log('hi ' + (new Date).toLocaleTimeString()));
        observableQueue.subscribe(obs, data => console.log(data), null, () => console.log('hi ' + (new Date).toLocaleTimeString()));


The output will be:

        start 10:30:40
        start 10:30:40
        { hello: 'world' }
        hi 10:30:41
        start 10:30:41
        { hello: 'world' }
        hi 10:30:41
        { hello: 'world' }
        hi 10:30:42
        completed

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