WIP
An immutable data cursor implementation.
Quick start:
import { initCursor } from 'dc-cursor';
// create cursor instance
let onModelUpdate = function(newModel) {
console.log('model updated, new value is:');
console.log( newModel.$val() );
model = newModel;
};
let model = initCursor([1, 2, 3], onModelUpdate);
// get value
console.log( model[0].$val() );
// => 1
// set value
model[0].$set('a');
// => model updated, new value is:
// => ['a', 2, 3]