Skip to content

ryanartecona/pipeline.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⟚ pipeline.js ⟚

An aspiring (though currently experimental) implementation of functional-reactive programming in JavaScript, inspired by ReactiveCocoa and Rx.


Intro

Rx-style FRP essentially gives you a unified way of defining, manipulating, managing, and reacting to anything that can be reasonably represented as a stream of values. In JavaScript, these include (but are definitely not limited to) familiar idioms such as

  • DOM events
  • Pub/sub patterns (e.g. EventEmitter)
  • Node streams
  • Promises (and callbacks and everything else Promises can represent)

Like Promises, FRP provides a general abstraction for a common pattern that lets consumers write code that is declarative, composable, and reusable. Unlike Promises, FRP value streams can send multiple values at arbitrary points in time (generally when a particular interesting event occurs), and so are well suited for representing changes of a value over time, or events emitted from a source. FRP unifies these patterns under a single API and provides combinators to concisely express complex stream transformations, so that you the application author can worry less about state and keep your focus on application logic.

Goals

This project's goals are to provide a minimal FRP core, a set of useful combinators, and the means to easily adapt the core to interface with third party libraries.

It is in a very early stage, but there are already robust JS FRP libraries available for production use:

Usage

(TODO)

For basic definitions of core classes, see the terminology document.For now, you can look through the test suite to see basic usage examples, and example/example1.html to see a crude in-browser example.

Helpful Resources

FRP in JavaScript

Elsewhere

Installation

pipeline.js is compatible with node, browser, and AMD environments. It is not yet published to npm.

Roadmap

See TODO.md. Contributions and questions welcome!


@ryanartecona

About

An aspiring implementation of FRP in JS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published