1.0.4 • Published 5 years ago
@vanir/unicorn-core v1.0.4
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