1.2.1 • Published 12 years ago

delta-stream v1.2.1

Weekly downloads
2
License
-
Repository
github
Last release
12 years ago

delta-stream

Emit deltas in change over a stream

Example

Create streams that emit deltas in changes. Then create reprensentations of deltas as other objects which are connected to the underlying streams.

var DeltaStream = require("../index")

var stream1 = DeltaStream()
    , stream2 = DeltaStream()

var observable1 = stream1.createObservable()
    , observable2 = stream2.createObservable()

observable1.on("change", function (changes) {
    // foo, bar
    // other, thing
    console.log("[CHANGE]", changes)
})

observable2.on("change:foo", function (value) {
    // bar
    console.log("[CHANGE:FOO]", value)
})

stream2.pipe(stream1).pipe(stream2)

observable1.set("foo", "bar")
observable2.set("other", "thing")

Installation

npm install delta-stream

Contributors

  • Raynos

MIT Licenced

1.2.1

12 years ago

1.2.0

12 years ago

1.1.2

12 years ago

1.1.1

12 years ago

1.1.0

12 years ago

0.3.4

12 years ago

0.3.3

12 years ago

0.3.2

12 years ago

0.3.1

12 years ago

0.3.0

12 years ago

0.2.0

12 years ago

0.1.0

12 years ago

0.0.2

12 years ago

0.0.1

12 years ago