1.0.4 • Published 5 years ago

@vanir/unicorn-core v1.0.4

Weekly downloads
1
License
-
Repository
-
Last release
5 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

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago