This package has been deprecated

Author message:

this package has been deprecated

dc-cursor

0.1.2 • Public • Published

dc-cursor

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]

/dc-cursor/

    Package Sidebar

    Install

    npm i dc-cursor

    Weekly Downloads

    1

    Version

    0.1.2

    License

    ISC

    Last publish

    Collaborators

    • blackchef