# fairmont-reactive

> Functional reactive programming in JavaScript and CoffeeScript.

Latest version **2.0.0** (published 2017-02-06) · ISC license · 0 weekly downloads

## Install

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

## 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 | 2.0.0 |
| Published | 2017-02-06 |
| First published | 2015-07-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 49 |
| Maintainers | dyoder, pandanick |

## Links

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

## Dependencies (3)

- [fairmont-core](https://npm.io/package/fairmont-core.md) 1.0.x
- [fairmont-helpers](https://npm.io/package/fairmont-helpers.md) 2.0.x
- [fairmont-multimethods](https://npm.io/package/fairmont-multimethods.md) 1.0.x

## Recent versions

- 2.0.0 (latest) — 2017-02-06
- 1.1.2 — 2016-05-04
- 1.1.1 — 2016-05-03
- 1.1.0 — 2016-05-02
- 1.0.0 — 2016-04-15
- 1.0.0-beta-40 — 2015-11-06
- 1.0.0-beta-39 — 2015-11-04
- 1.0.0-beta-38 — 2015-10-13
- 1.0.0-beta-37 — 2015-10-13
- 1.0.0-beta-36 — 2015-10-09
- 1.0.0-beta-35 — 2015-10-07
- 1.0.0-beta-34 — 2015-10-05
- 1.0.0-beta-33 — 2015-09-20
- 1.0.0-beta-32 — 2015-09-02
- 1.0.0-beta-31 — 2015-08-29
- … 13 more at https://npm.io/package/fairmont-reactive/versions

## README

# Fairmont-Reactive

Fairmont-Reactive is a JavaScript library for functional reactive programming. It's part of the [Fairmont][] library. You can use it by itself, or simply as part of the [Fairmont][] library.

## Installation

`npm install fairmont-reactive`

## Examples

Here's a simple reactive Web app implementing a counter using Fairmont's Reactive programming functions.

In JavaScript:

```javascript
var $ = require("jquery"),
  F = require("fairmont");

$(function() {

  var data = { counter: 0 };

  F.go([
    F.events("click", $("a[href='#increment']")),
    F.map(function() { data.counter++; })
  ]);

  F.go([
    F.events("change", F.observe(data)),
    F.map(function() {
      $("p.counter")
        .html(data.counter);
    })
  ]);
});

```

In CoffeeScript:

```coffeescript
{start, flow, events, map, observe} = require "fairmont-reactive"

$ = require "jquery"

$ ->

  data = counter: 0

  go [
    events "click", $("a[href='#increment']")
    map -> data.counter++
  ]

  go [
    events "change", observe data
    map ->
      $("p.counter")
      .html data.counter
  ]
```

You can run [this example][] or look at our other reactive examples:

- a [todo-list][]
- an [echo server][]
- a [Web server][]
- a [file watcher][]

[this example]:https://github.com/pandastrike/fairmont-reactive/blob/master/examples/web-apps/counter
[todo-list]:https://github.com/pandastrike/fairmont-reactive/blob/master/examples/web-apps/todo-list
[echo server]:https://github.com/pandastrike/fairmont-reactive/blob/master/examples/echo-server.litcoffee
[Web server]:https://github.com/pandastrike/fairmont-reactive/blob/master/examples/web-server.litcoffee
[file watcher]:https://github.com/pandastrike/fairmont-reactive/blob/master/examples/file-watcher.litcoffee

## Documentation

Check out the [wiki][] for an getting started guides, tutorials, and reference documentation.

## Status

[Fairmont][0] is still under heavy development and is `beta` quality, meaning you should probably not use it in your production code.

## Roadmap

You can get an idea of what we're planning by looking at the [issues list][200]. If you want something that isn't there, and you think it would be a good addition, please open a ticket.

[tickets]:https://github.com/pandastrike/fairmont/issues
[Fairmont]:https://github.com/pandastrike/fairmont
[wiki]:https://github.com/pandastrike/fairmont/wiki

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