watchly

very simple object watcher using very simple events (evently)

Usage no npm install needed!

<script type="module">
  import watchly from 'https://cdn.skypack.dev/watchly';
</script>

README

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));