# mosaic-reactive

> Light-weight reactive library based on Promises/A-compliant implementations

Latest version **0.1.15** (published 2016-10-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install mosaic-reactive
pnpm add mosaic-reactive
yarn add mosaic-reactive
bun add mosaic-reactive
```

## 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.15 |
| Published | 2016-10-26 |
| First published | 2016-05-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mikhail Kotelnikov |
| Maintainers | mkotelnikov |

## Links

- npm: https://www.npmjs.com/package/mosaic-reactive
- Repository: https://github.com/mosaicjs/mosaic-reactive
- Homepage: https://github.com/mosaicjs/mosaic-reactive#readme
- Issues: https://github.com/mosaicjs/mosaic-reactive/issues
- npm.io page: https://npm.io/package/mosaic-reactive

## Recent versions

- 0.1.15 (latest) — 2016-10-26
- 0.1.14 — 2016-10-25
- 0.1.13 — 2016-10-13
- 0.1.12 — 2016-07-02
- 0.1.11 — 2016-07-02
- 0.1.10 — 2016-06-22
- 0.1.9 — 2016-06-22
- 0.1.8 — 2016-06-19
- 0.1.7 — 2016-06-19
- 0.1.6 — 2016-06-19
- 0.1.5 — 2016-06-19
- 0.1.4 — 2016-06-14
- 0.1.3 — 2016-06-14
- 0.1.2 — 2016-06-12
- 0.1.1 — 2016-06-10
- … 2 more at https://npm.io/package/mosaic-reactive/versions

## README

# mosaic-reactive

A very simple reactive framework inspired by the http://reactivex.io/.
Features:
 * 350 lines of code; 8Kb (non minimized)
 * Based on PromiseA-compliant promises; can be used with any external promise 
   implementations.
 * Each stream is a deferred object with resolve/reject/then methods. Main methods:
   - Deferred
   - Stream
 * Provides the following methods:
   - buffered
   - each
   - filter
   - index
   - map
   - merge
   - pipe
   - zip
 * Experimental methods
   - delay
   - interval

Example: 
```
// var Promise = require('promise'); // - not required in NodeJS environment 
var reactive = require('mosaic-reactive');

var source = reactive.Stream(Promise, {
	methods : reactive
});

var out = source.map(function(value) {
	return value.toUpperCase();
}).each(function(value) {
	console.log('* ', value);
});

var array = [ 'first', 'second', 'third', 'fourth', 'fifth' ];
array.forEach(source.emit);
source.end();

return out.then(function() {
	console.log('Finished');
}, function(err) {
	console.log('Error!', err);
});


```

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