npm.io
0.2.0 • Published 12 years ago

watchly

Licence
MIT
Version
0.2.0
Deps
1
Vulns
0
Weekly
0

#watchly

very simple object watcher using very simple events (evently)

Installation

$ npm install watchly

Usage

var watchly = require('../index');

var w = new watchly.Watcher();
console.log(w.prototype);

function log(a) {
    console.log("triggered with " + a);
}

w.on(1, log);
w.set(1, 5);
console.log("w[1] has value:", w.get(1));

Keywords