kek
observable set (using mobx) that produces rows of rfc6902 patches (using fast-json-patch) as readable stream.
example
type IModel = id: string n: number const models: IModel = id: "foo" n: 10 id: "bar" n: 5 const kek = <IModel>models : number { return kekchildrenreduce<number> { acc += xn return acc } 0} const reads = kek reads const baz = id: "baz" n: 1 kek kek kekchildren
outputs:
[ { op: 'add', path: '/2', value: { id: 'baz', n: 1 } } ]
[ { op: 'replace', path: '/2/n', value: 5 },
{ op: 'add', path: '/3', value: { id: 'qux', n: 0 } },
{ op: 'add', path: '/4', value: { id: 'quux', n: 0 } } ]
[ { op: 'replace', path: '/0/n', value: 11 } ]
[ { op: 'replace', path: '/1/n', value: 6 } ]
api