objectlisteners
v1.0.5
Published
Creates arbitrary event listeners that you can use to watch for changes in an object and fire event subscriptions
Downloads
6
Maintainers
Readme
ObjectListener.js
Customizable event listener system for arbitrary objects. It's quite performant and we use it for state management (see StateManager.js)
npm i objectlisteners
//Example:
let events = new ObjectListener();
let x = { y: 1, z: { w: 2 }}
events.addListener("y",x,"y");
events.addListener("z",x,"z");
x.z.w = 3;
x.y = 2;
//See console
Author: Joshua Brewster License: AGPL v3.0 License