given an mobservable will emit diff changesets
npm install observable-delta-streamgiven an mobservable will emit diff changesets.
``js
var deltas = require('observable-delta-stream')
var m = require('mobservable')
var foo = m.observable({ bar: 555, qux: [] })
deltas(foo).on('data', function (delta) {
console.log('change:', delta)
})
foo.bar = 666
foo.qux.push(42)
`
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 } ]
`js`
var deltas = require('observable-delta-stream')
Returns a readable stream that will produce rows of delta arrays using changeset when observable` is changed.
Destroys the stream and disposes the underlying reactive view associated with this stream.
mit