1.0.4 • Published 6 years ago

@vanir/unicorn-core v1.0.4

Weekly downloads
1
License
-
Repository
-
Last release
6 years ago

Introduction

Dependence Collection Library

Installation

npm install -g  unicorn-core

then import unicorn-core and use it.

const obs = new Observable(object); // create observable object

// watch a field in observable object
const watcher = new Watcher(
    obs,
    key,
    () => {
        // callback function
    },
    value => {
        // computedUpdate function with callback function return value
    }
);

autoRun(watcher.callback);     //  begin to collect watching field

Todo List

  • npm publish
1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago