Kefir — is an Reactive Programming library for JavaScript inspired by Bacon.js and RxJS with focus on high performance and low memory usage.
For docs visit rpominov.github.io/kefir. See also Deprecated API docs.
Run tests in your browser (gh-pages
branch, i.e. last stable version)
Kefir available as NPM and Bower packages, as well as simple files download.
npm install kefir
bower install kefir
See downloads section in the docs.
Also available on jsDelivr.
We don't support IE8 and below, aside from that Kefir should work in any browser.
The NPM package ships with Flow definitions. So you can do something like this if you use Flow:
// @flow
import Kefir from 'kefir'
function foo(numberStream: Kefir.Observable<number>) {
numberStream.onValue(x => {
// Flow knows x is a number here
});
}
const s = Kefir.constant(5);
// Flow can automatically infer the type of values in the stream and determine
// that `s` is of type Kefir.Observable<number> here.
foo(s);
To build all the things: /dist
, docs, tests for browser, etc. run:
grunt
grunt bower # to also install bower packages which needed for docs
To run tests:
npm test