0.4.4 • Published 6 years ago

kefir.db v0.4.4

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

Kefir DB

WIP. High-level reactive states for Kefir stream library.

Short description

Unlike many others stream implementations, Kefir does have a stateful stream concept called Property. Still this concept is very low-level and basic, without a functionality we typically expect from an app-level reactive state. This library is based on native Propery, adding a number of additional features and, most importantly, establishing an API for pluggable middlewares.

Usage

$ npm install kefir.db
import K from "kefir"
import * as D from "kefir.db"

let inc = (x) => x + 1
let dec = (x) => x - 1

let action$ = K.merge(
  K.constant(0),     // initial counter
  K.later(100, inc), // increment counter after 100ms
  K.later(200, dec), // decrement counter after 200ms
  K.later(300, inc), // increment counter after 300ms
)

let Store = D.makeStore({})    // pass some options, check `makeStore.options` or docs
let state$ = Store(action$).$ // make state, getting stream from a `Store(..)` call

state$.log("state$")          // use built-in Kefir logging
// state$: 0--1--0--1-->

Tutorials

1. State

Getting started with reactive states.

2. Store

Let's make a better store abstraction.

10. Logging

Learn how to use Logging middleware.

11. Control

Learn how to use Control middleware.

Links

0.4.4

6 years ago

0.4.3

6 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago