observable-delta-stream
given an mobservable will emit diff changesets.
example
var deltas = var m = var foo = m foobar = 666fooqux
outputs:
change: [ { type: 'put', key: [ 'bar' ], value: 555 },
{ type: 'put', key: [ 'qux' ], value: [] } ]
change: [ { type: 'put', key: [ 'bar' ], value: 666 } ]
change: [ { type: 'put', key: [ 'qux', '0' ], value: 42 } ]
api
var deltas =
var stream = deltas(observable)
Returns a readable stream that will produce rows of delta arrays using changeset when observable
is changed.
stream.destroy(err)
Destroys the stream and disposes the underlying reactive view associated with this stream.
license
mit